Sponsors

 

Tuesday, October 16, 2007

Mobile Safari Changes for 1.1.1

Ok, I've been finding alot of useful stuff that Apple did for iPhone 1.1.1 that will help use developers alot! Instead of listing each change in a seperate post, I decided in this post to give you a bulleted run-down that I captured after going through the online documentation that Apple has. Let's look at the new features:
  • For the viewport meta tag there are two new constants available for you to use:
    device-width
    device-height
    for more info on using them go to this page here and this page here.
  • The next item doesn't explicitly say that its for 1.1.1, but I've never seen it before. Over on Google Groups, one question has come up on how to keep Safari from creating a phone hyperlink on a number that it thinks is a phone number but is not a phone numer! Introducing the meta tag:
    format-detection
    for information on how to use this meta tag, go to this page.
  • Here's another item not linked explicitly to 1.1.1, linking to a youTube video. Saw some questions in the Google Groups on this. Here is a page that gives you the syntax.
  • So you have an input form on your web page. And you don't like how mobile Safari either auto-corrects the user's spelling or auto-capitalizes. Or, maybe you want to make sure that one or both of these things happen during text input. iPhone 1.1.1 adds two new attributes you can use on an input tag to address this problem:
    autocorrect
    autocapitalize
    How to use these attributes...
  • Read some interesting information on one-finger events. What interests me here is the mention of a working onscroll event.
  • Alright, we know that the onresize event doesn't work properly on the iPhone. Well iPhone 1.1.1 introduces the onorientationchange event to use in your body tag. Why they just didn't make onresize work is beyond me. But at least now we can check this without using setTimeout hacks! More information on this event. Oh yes, here you will find out that they added a new property to the window object: orientation. So, in your event handling routine you can check window.orientation for a value and decide what to do. Cool! Hey it returns the angle in degrees how the user re-oriented their iPhone! Doubly cool!
  • You might want to check out this list of Supported Events for the iPhone as of 1.1.1.
  • There is a new debugging console built into Safari for 1.1.1.

Well, that is about it. I know they made some CSS changes too but what precisely I do not know. But hey! All this stuff I've bulleted is very good stuff! All you web app developers for the iPhone / iTouch: enjoy!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.