views:

36

answers:

1

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

However, when I add a new subview using [window addSubview:whatever.view]; it shows up like this:alt text

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

Thanks!

+2  A: 

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.

Eiko
ok now i get: `[viewController addSubview:]: unrecognized selector sent to instance`thanks for your help.
Wind Up Toy
i think i'm a little confused on when to use `[viewController view]` and `viewController.view` because one works in some places and not in others...
Wind Up Toy
viewController is not a UIView, so you cannot add subviews. [viewController view] and viewController.view is the the same, just a different syntax.
Eiko
then how exactly do i go about this?thanks for your help.
Wind Up Toy
Just do it the same as on the working views. Without code it's hard to look at.
Eiko