Creating a webpage for iphone

I am creating a web page for iphone, I need a page to display effectively on iphone as well as on PC. I code in xhtml and use JavaScript and css support. The problem is that I get the correct view on the PC, but too small on the phone. How to adjust page size. I check the user agent and upload a separate page (except one for the PC) for iphone. But I don’t know that step changes should be made to the attributes of the body, inputs and other things in order to allow it to view mobile browsers correctly.

+5
source share
2 answers

Are you doing the same page for both devices? A common practice is to make two separate pages that are optimized for both devices, which by their nature have different shapes and characteristics.

so the code along the lines

$browser = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
if ($browser == true)  { header('Location: http://www.yoursite.com/iphone/'); }
//else{echo 'just carry on';}

In terms of customizing the iPhone, there are quite a few iPhone frameworks, see here for a list around which development will be accelerated, and if you are developing on a Mac with Snow Leopard and the latest SDK, and now there is a built-in project in dashcode to create it.

+3
source

I do not know if this will help you, since you have already begun to develop your page. But this kit is the final kit for the iPhone network, as far as I know. Check this.

iWebKit

+1
source

All Articles