1
votes

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.

1

1 Answers

2
votes

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.