RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


iPhone Web Development with Ruby on Rails : Page 4

Leverage the tremendous buzz surrounding the iPhone by customizing your web site with CSS and Ruby on Rails.

Preventing the Zoom
Apple has decided not to allow applications by third parties to be installed on their device, however, with a little ingenuity, you can create a web application that looks and behaves as though it was installed on the phone. This effect is ruined when your users are zooming through your page as though your app was a Google map. You can disable this feature in a single line with the following snippet:

<meta name="viewport" content="user-scalable=no" />
The viewport metatag has functionality beyond the scope of this article. Check with Google for more information on its use.

Making a Call
The iPhone will automatically find numbers and convert them where appropriate. Sometimes you want to connect a user directly to your call center without having to spell the whole number out. The "tel:" format works much like the mailto: syntax, in that it will dial a number while allowing you to replace the number with something more descriptive. For example:

<a href="tel:8675309">Jenny</a>.
Smooth Sailing
While Apple claims that its device carries a fully featured desktop-style web browser, it's clear it will take some manuevering to navigate a successful iPhone web experience. Hopefully after reading this article, you'll be armed with the tools and tricks needed to make your Ruby web-apps play nice with the Apple iPhone.

Chris Haseman is an independent software engineer specializing in wireless development. He can be found riding his bike between coffee shops in San Francisco. He's the author of the book Android Essentials (published by Apress). In his spare time, he's a resident DJ at xtcradio.com and a martial arts instructor.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date