371273
371273

Reputation: 5436

How can I automatically set the orientation of an iPhone subview?

I'm going in circles here. I have set shouldAutoRotateToInterfaceOrientation for all the view controllers. My app is running correctly in landscape, like this:alt text http://img517.imageshack.us/img517/3749/screenshot20100701at802.png

However, when I add a new subview using [window addSubview:whatever.view]; it shows up like this:alt text http://img291.imageshack.us/img291/3749/screenshot20100701at802.png

How can I make the new subview automatically be added in landscape orientation?

Thanks!

Upvotes: 2

Views: 182

Answers (1)

Eiko
Eiko

Reputation: 25632

window is probably not managed by one of your view controllers that implement shouldAutoRotateToInterfaceOrientation.

Add your view to one of your view controllers that implement the autorotation.

Upvotes: 2

Related Questions