Excellent, thanks Sean. I included the iui.js for now and that does the business with scrollTo; I'm betting by the end of today a few more tricks may be required.
Regarding, the 'web app capable' include (that's definitely of interest!); <meta name="apple-mobile-web-app-capable" content="yes" /> I tried including it in the head of the doc and loading an existing 'web app' from the home page, but it doesn't hide all chrome (I was expecting the bottom chrome to be hidden too) - does the 'bookmark' need to be made after the meta tag is included in the head of the document? This is how the <head> looks at the moment http://pastie.org/607518 (don't worry about the ERB tags - the app is running on Rails, but those styles and js includes are working), I'm wondering if I've done something wrong with the 'apple-mobile-web-app-capable' include Cheers Neil Sean Gilligan wrote: > Neil wrote: > >> how do I get the location/search >> bars to 'auto-hide' as they do on iphone.facebook and m.flickr once >> the page has loaded? >> > > You almost guessed it: > >> scroll down the page. >> >> > > The old-school trick is to use: scrollTo(0, 1); > > You can look at the iUI source to see how this is done: > http://code.google.com/p/iui/source/browse/iui/iui.js > > iUI is only 514 lines, but look for setOrientation() to find the call to > scrollTo() > Note: that scrollTo is called both from onload and onorientationchange > (and when onorientationchange is not present, it is called from the timer) > > If your app can work well without any browser chrome, you can add the > meta tag: > <meta name="apple-mobile-web-app-capable" content="yes" /> > > This will hide all chrome when you use the "Add to Home Screen" option > and the WebApp is launched from the Home Screen. > > -- Sean > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
