30 Jul 2007
•
1 min read
Smooth iPhone Animations
Despite all the excellent iPhone apps out there, one problem hasn't yet been solved. Specifically, it's been impossible to produce full-screen, smooth, native-like wipe transitions between "pages." iUI, Joe Hewitt's excellent framework for iPhone apps, could only produce 3-5 frames per second, for extremely choppy animations.
Yesterday, I discovered a breakthrough that produces smooth wipes at almost-native speeds. The secret is animating scrollTo
instead of trying to move elements. Oddly, scrollTo
's happen at native speeds, while moving elements happen at much slower speeds. It's akin to getElementsByClassName
being baked into a JS implementation vs. having to implement it yourself using JS.
It's incredibly smooth.