iPad/iPhone browser crashing when loading images in Javascript

Update: I think there’s an even easier way to do this, depending on your application. Instead of having multiple images, if you simply have one <img> element or Image object (or maybe two, like a ‘this’ image and a ‘next’ image if you need animations or transitions) and simply update the .src, .width, .height and … Read more

Disabling user selection in UIWebView

Here are a few ways to disable selection: Add the following to your mobile web documents <style type=”text/css”> * { -webkit-touch-callout: none; -webkit-user-select: none; /* Disable selection/copy in UIWebView */ } </style> Programmatically load the following Javascript code: NSString * jsCallBack = @”window.getSelection().removeAllRanges();”; [webView stringByEvaluatingJavaScriptFromString:jsCallBack]; Disable the Copy / Paste user menu: – (BOOL)canPerformAction:(SEL)action withSender:(id)sender … Read more