Reputation: 1082
I am new to iPhone applications, my application contains both tab bar controller and navigation controller as subviews to window. when tab bar controller is loaded I want to rotate my view to landscape mode to display some images with cover flow. but when I rotated to landscape mode the view is not rotating. I have used the method - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; the and returned YES in the method definition. I have tried the autorotation thing without Navigation and TabBarcontrollers, it is working.
some one please help me. some help will be very useful to me.
Upvotes: 1
Views: 1136
Reputation: 78905
If you have a tab bar, then all views contained in that tab bar have to implement the method shouldAutorotateToInterfaceOrientation:
and return YES, not just the currently visible view.
So if you have a tab bar with four "buttons" allowing to switch between four navigation controllers, all four navigation controllers must return YES.
Upvotes: 2