Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
HI all,


I am having a view controller, whose view holds two subviews (view1 and view2).

I am adding this 'viewcontroller.view' on a button click to window

view1 and view 2 is having different layout in different orientations.
I can do the frame changes in didOrientationChanged...method and its working fine.

But if i am already in landscape mode, and do the button click , i am not able to get the orientation details in loadView, moreover the viewcontroller.view in coming n portrait mode only regardless of current landscape orientation . UIDevice orientation is also returning portrait mode value.


Only we can show Portrait mode if we add viewcontroller.view to window on loading? ??

But i found we can get the orientation value in loadview in case of pushing viewcontroller rather than adding simply viewcontroller.view to window

Please help me in sorting out this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.