Rotating the UIOrientation of a specific view
In a TabBarController the UI of a view will only r开发者_Python百科otate if all of the view within the tab bar can rotate as well (according to app dev center). Is there anyway that i can specify to rotate only 1 of 4 views within my TabBarController?
If each view has its own ViewController you can define - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
for each one.
If they are just UIViews, you could set each one to have a specific tag
property, then in the controller for the tab bar check which view is showing and allow rotation based on that.
精彩评论