Wednesday 10 March 2010

User & Tech Guide - iPhone web pages

I have just finished implementing the User and Technical Guide pages as iPhone compatible web pages into my native application.

I essentially did this by coding the raw html for these two pages, substituting the required text into the respective html files. I added meta data so that the text would be displayed at 480 pixels wide (the iPhone resolution).

I then created a separate style sheet to style the different elements of the page. Namely the 'div' tag, adding a nice rounded rectangle effect, and the 'p' tag to style the text as Helvetica and of 18px, to give a more iPhone feel.

Testing that these files worked as expected in the simulator I then wanted them to load natively within the application. I added them into the Xcode project where they appeared under Resources. I then looked up the corresponding view controller for the views I wanted to display the web pages into.

Using this approach the web pages successfully rendered. However they couldn't be styled by the separate style sheet due to addressing issues. I therefore had to include the stylings in both web pages locally.

No comments:

Post a Comment