3 ms·
Another example of a hybrid app is the iOS (and Mac) App Store. A significant amount of the views are basically HTML. By far, the biggest improvement one can d
by sumukh1 14y ago
Another example of a hybrid app is the iOS (and Mac) App Store. A significant amount of the views are basically HTML.
By far, the biggest improvement one can do is to get rid of the 300ms or so delay on a UIWebView
- peterkelly 14y agoIncidentally, the 300ms delay is not to prevent accidental touches, it's so the system can detect the difference between a double tap and a single tap. If you don't make a second tap within 300ms, it goes and fires the single tap event. But it can't do that until it knows for certain that it's not simply the first tap in a double-tap sequence. The solution to this, if you're not using double-taps, is to respond to the event when it enters the initial phase (then the finger is pressed), rather than when it's released. I'm not sure if you can do this through javascript, but I know it's possible in Objective C by either overriding – touchesBegan:withEvent:, or implementing your own gesture recogniser.
- daniel_sim 14y agoWhat you need to do is use a 'touchUpInside' event, there are a couple wwdc preso's that cover it. Basically you compare coords of a touchend event to the coords of the target. Touchend events fire instantly so you dont have to worry about the 300ms click delay. Dug this out of some old code, wont work out of the box but you get the gist. https://gist.github.com/3067704 https://gist.github.com/3067704