views:

534

answers:

1

I'm developing a webapp for the iphone. I'd like to force a certain page to always show in landscape mode not rotate. Is there an easy way to do this?

+3  A: 

You can not do this from within your web app for all browsers. Safari (or whichever app is displaying your web app) is the one that controls the orientation of the UIView.

However you could potentially have your own special browser UIWebView that determines the orientation from your web app. But then your web app will only have your desired behaviour in your custom app. Also I am assuming you are developing a web app because you want to avoid developing a native iphone application. If so then this suggestion would go against that motivation ;)

So, short answer is if you want to do it in Safari then the answer is No. If you still insist on doing it, then you need develop an native iphone app to view your web app.

hhafez