How to disable “shake to undo” in iPhone application written with Phonegap?
문제
The only thing I've found is that you have to set UIApplicationSupportsShakeToEdit to false in plist file but it doesn't work for me.
해결책
I inserted this line:
[UIApplication sharedApplication].applicationSupportsShakeToEdit = NO;
in the webViewDidFinishLoad class, it worked wonders for me.
Go to the MainViewController.m and change webViewDidFinishLoad
to look like this:
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
// Black base color for background matches the native apps
theWebView.backgroundColor = [UIColor blackColor];
[UIApplication sharedApplication].applicationSupportsShakeToEdit = NO;
return [super webViewDidFinishLoad:theWebView];
}
제휴하지 않습니다 StackOverflow