I subclassed UITabBarController in order to override shouldAutorotateToInterfaceOrientation: so that I can support landscape mode in certain circumstances. When I run this, the tab bar controller gives me the following message when the overridden method returns NO
The view controller <...0x644f50> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
Any suggestions on how to get ride of the message other than return YES all the time in shouldAutorotateToInterfaceOrientation?
If you return NO, it means that your view controller can’t be displayed on any of the 4 orientations.
You should think which orientations you want it to support and use the
orientationparameter they give you to accept those orientations.For example, if I wanted my view controller to support portrait and landscape right, this would be my implementation (This could be reduced to a line, but I’m expanding it for the sake of clarity):