i just create a new single view application,and write three funcs in ViewController.m file.
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape;
}
-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
First Question
I expect the Simulator rotate my view,but the view orientation is Portrait. And I find the third func not called in ViewController. why?
Second Question
I read some blogs , they said if shouldAutorotate return NO, the func supportedInterfaceOrientations will not called,but in my test, this func called several times,why?