iOS 5 (Beta 2): Safari Gains Native Scrolling, Nitro JavaScript Support

http://www.razorianfly.com/wp-content/uploads/tip-scrollbars.jpg

Johan Brook on the addition of “Native Scrolling” in Safari on iOS 5 (Beta 2):

This is huge for web apps. No more custom Javascript to fake the native behavior, like iScroll and lately Scrollability from Joe Hewitt. Even Apple has written their own internal web framework (“PastryKit”) to patch up things like scrolling and fixed positioned elements. Scrollability is the best fake-native scrolling I’ve seen so far, and the one in apps built with Sencha Touch is pretty sharp as well, but I don’t think they can beat this alternative provided by Apple.

According to Johan Brook, Mobile Safari now supports a new CSS property which allows developers of web apps to experience the same, native scrolling and “momentum” as seen in both native and third-party throughout iOS – the only difference being, because it’s a web app, the experience is completely web-based.

One area in particular where iPhone web apps fall short of native iPhone apps is scrolling. Take for example a long list, such as your full address book in Contacts, or all your songs in the iPod app. When you scroll these lists, you can fling the list, and the list will scroll at high speed after you let go. The effect is sort of like spinning a wheel with very little friction. With iPhone web apps, you can make a list that looks almost, maybe even exactly, like a native iPhone list view. But all web views on the iPhone scroll with almost no momentum. You can’t fling them. iPhone web views feel like they have a lot of scrolling friction.

In related news, Safari on iOS 5 now also carries support for a new Nitro JavaScript engine. Confirmed by a thread on Hacker News (via CNET), earlier this month.

Q: Did they fix the bug from 4.3 where home screen web apps don’t use Nitro?

A: This is probably breaking my NDA to say this, but yes, they did. Web.app now has the “dynamic-codesigning” entitlement, which enables Nitro.

As noted, however, this support is exclusive to Safari, with third-party apps which use UIWebView not able to take advantage due to “restrictions that prevent the Nitro entitlement from being extended to all apps for security reasons.”

[DaringFireball via MacRumors]

7coverage osxcoverage ipadcoverage
Daily Updates
Get this in your inbox. Subscribe today.