tags:

views:

18

answers:

1

I want to call this method in a user defined function

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

Is it possible ?? if yes,How ?? Pl. guide me.

+1  A: 

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
KennyTM
but how to call this Function in .m file ? If we do by [self shouldAutorotateToInterfaceOrientation] then we are required to pass arguement . What arguement should be passed bcoz it is of UIInterfaceOrienttion type ?
mindfreak
@mindfreak it will be automatically called by the system.
KennyTM