我在做播放器横屏的时候,设置自动横屏,每次发生转屏的时候就会走其他界面的viewdidload(这种情况只有第一次运行时,并没点击其他界面,直接在本界面进入播放器的时候会发生),导致frame宽高相反,我该怎么解决可以? 为什么会走其他界面的viewdidload?
我在播放器里横屏这样写的:
(BOOL)prefersStatusBarHidden
{
return YES; //隐藏为YES,显示为NO
}
(BOOL)shouldAutorotate
{
return YES;
}
//横屏
(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
//return UIInterfaceOrientationMaskLandscapeRight;
}
这是什么语言,为啥看不懂啊
一个变量名四五个单词,,,原谅我是啥都不懂的小白。。。