For example if you want to your project only support Landscape or Portrait Orientation then when you put bellow line... i.e
-(void)viewWillAppear:(BOOL)animated
{
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
}
then its give warning like...
'UIDevice' may not respond to 'setOrientation:'
so for solve this warning just put bellow code where you use this line
@interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere)
- (void) setOrientation:(UIInterfaceOrientation)orientation;
@end
No comments:
Post a Comment