I want to call this method in a user defined function
- (BOOL)shouldAutorotateToInterfaceOrien开发者_如何学Pythontation:(UIInterfaceOrientation)interfaceOrientation
Is it possible ?? if yes,How ?? Pl. guide me.
This method should be implemented for a custom UIViewController, for instance
@interface MyViewController : UIViewController {
...
}
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)io;
@end
@implementation MyViewController
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)io {
return io != UIInterfaceOrientationPortraitUpsideDown;
}
@end
精彩评论