Force iPhone landscape app

How do you force the iPhone web application (and not the native application) in landscape mode?

+6
safari iphone mode landscape
source share
2 answers

I don’t know how to force it at startup, but I found a neat way to properly scale your content when changing from “Portrait” to “Landscape”, especially if you use canvas.

<head> <meta name="viewport" content="initial-scale=1.6; maximum-scale=1.0; width=device-width; "/> ... </head> 

So, as soon as your user switches the phone to landscape mode, your page will appear in the correct timeline.

+5
source share

I do not think that you can force the device in landscape mode. You can detect if the device is in landscape mode. See here, for example, javascript: http://www.engageinteractive.co.uk/blog/2008/06/19/tutorial-building-a-website-for-the-iphone/

+1
source share

All Articles