Support the iPhone rename

author:

contributor:

published:

updated:

source uri:

Summary

There are a few tasks involved in supporting the iPhone. First, if a particular page in your Acre...

Content

There are a few tasks involved in supporting the iPhone. First, if a particular page in your Acre app is supposed to respond differently to a desktop browser and to an iPhone, then you need to detect that the page is serving an iPhone and include the corresponding iPhone-specific template file, called `page-iphone-version` in this code sample:

> 0">
> $${acre.include("page-iphone-version")}
>
>
> ... normal page here ...
>

Next, you want to make sure that the iPhone-specific template includes a meta tag that fixes the web page's width to the device's width and sets the scale to 1.0:

>
>
>

This makes sure that everything is 100% scaled, and you can then lay out your page accurately to the pixel.

You might find it convenient to open two "tabs" on your iPhone: one for the page you are developing, and one for /acre/touch so you can quickly force your iPhone's Safari to clear Freebase cookies and get the latest code changes.

Created by: dfhuynh via Cookbook Jun 4, 2009
Last edited by: dfhuynh via Cookbook Jul 9, 2009

Recent Discussions about Support the iPhone

There is no discussion about this document.

Start the Discussion »
Explore the Data
View all the data we have for Support the iPhone
Flag this Document
Why do you want to flag this document?