开发者

calling UIview methdods

开发者 https://www.devze.com 2022-12-25 03:01 出处:网络
I want to call this method in a user defined function - (BOOL)shouldAutorotateToInterfaceOrien开发者_如何学Pythontation:(UIInterfaceOrientation)interfaceOrientation

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号