0

I am working on orientation work on uitabbar application. I am using 5 tabbar item in tabbar. I want only 4 tab bar item to be rotated in both Landscape and potrait. but the issue is when i put "return no" to shouldAutorotateToInterfaceOrientation in non rotating tabbar item, all tab bar are not working. can anybody please tell me what i went wrong?

Thanks in advance.

Regards, sathish

leppie
  • 115,091
  • 17
  • 196
  • 297
sathish kumar
  • 1,061
  • 6
  • 16
  • 31

1 Answers1

6

By default, a UITabBarController will only return YES to the shouldAutorotateToInterfaceOrientation: message if every one of its child controllers returns YES to that message. The behavior you're seeing is the expected behavior.

Check out the fourth list item on this page.

Adam Milligan
  • 2,826
  • 19
  • 17
  • Thanks adam for your reply. You mean i have to make UITabBarController custom and declare shouldAutorotateToInterfaceOrientation to NO over there. – sathish kumar Nov 22 '10 at 08:42
  • You could try to subclass UITabBarController and customize how it handles rotation. I haven't done that, but I don't see any obvious reason it wouldn't work. I would be certain that this is the user experience you want though; I think I would be confused if the app rotated on some tabs but not on others. – Adam Milligan Nov 23 '10 at 07:01