how to support landscape/Portrait orientation only for one UIView
I'm having 5 view controllers in my navigation based application, 开发者_JAVA技巧I need to support both landscape/Portrait mode in only a one view, following items displaying in the view Navigationbar Tool bar with two buttons UIImageView in center. UILabe below the navigaton bar.
Can any one help me how to support the orientation change to only for this view.
Regards,
sam.
You should use shouldAutorotateToInterfaceOrientation in your view controller, and return YES for view controllers that should support both Landscape/Portrait
http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/shouldAutorotateToInterfaceOrientation:
精彩评论