How to disable “shake to undo” in iPhone application written with Phonegap?
Question
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.
Solution
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];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow