Welcome!

iPhone Authors: Ian Thain, Chris Fleck, Marek Miesiac, John Ryan, Maureen O'Gara

Related Topics: iPhone, Wireless

iPhone: Article

How to Display Safari Address Bar on iPhone v1.1.3

OK OK, so I admit I'm already running version 1.1.3 of the iPhone firmware

OK OK, so I admit I'm already running version 1.1.3 of the iPhone firmware. While I think it's fantastic that I now get the ability to add web icons to the home screen, and that the home screen has multiple pages, I usually spend my first few minutes on a new version of the firmware looking for changes in Safari that might impact iPhone web application developers.

One that I noticed right away is that Safari is no longer fooled by the 1-pixel scroll trick. In case you're not familiar with this trick, the way it worked is that under previous versions of the iPhone software, if you scrolled the web page slightly, then the address bar would hide itself. iPhone web application developers took advantage of this to make their applications look a little more "native" by using JavaScript to simulate a user scroll of just one pixel.

What I've noticed on the new 1.1.3 firmware is that Safari no longer auto-hides the address bar when you're scrolling... which means that web applications now look a little less "native" than they used to, especially if they were designed to fit exactly into the space on the iPhone screen _without_ the presence of the address bar. Apps like Gmail no longer cut "just right" on the fold and you can actually see some of these app "twitch" a little when the code that previously caused the address bar to hide is executed.

If you want my personal opinion on this, I'm thinking that this move is designed deliberately to make sure that people know the difference between web applications and native applications - the presence of the Safari address bar. Without that, it becomes really, really hard to tell whether you're on a web app or a local native app. This difference is trivial at the moment because the list of "legal" (e.g. non-hack-created) iPhone native applications is finite and well-known. Once the SDK comes out in "late" (I'm guessing Feb 29th) February, we're going to see a lot of applications that we've never seen before, and users will need to know whether they're looking at a web app or a native app.

That said, I've done some more experimenting and there are places where Gmail _does_ successfully scroll down past the address bar... but the address bar used to visibly animate itself away, which it doesn't seem to do anymore... Who knows, I could be on crack and nothing has changed w/Safari at all... 

tags:        
links: digg this  del.icio.us  technorati  reddit

About Kevin Hoffman

Kevin Hoffman, editor-in-chief of SYS-CON's iPhone Developer's Journal, is Technical Chair of iPhone Developer Summit. He has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise web applications in VB, C++, Delphi, and C. Hoffman is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. He authors The .NET Addict's Blog at .NET Developer's Journal.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
rec 01/17/08 03:58:13 PM EST

ummm. thats completely wrong. once the webpage is fully loaded, the address bar disappears like it always has. nothing has changed