视图控制器呈现纵向随机

时间:2017-03-16 10:49:55

标签: ios objective-c xcode uiviewcontroller orientation

我在横向左侧模式下呈现视图控制器。它的工作正常。但我面临一个随机问题,其中控制器呈现纵向模式。我不知道为什么会这样。我正在使用下面的代码在呈现视图的同时旋转视图

- (BOOL)shouldAutorotate
{
return NO;
}

- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}

0 个答案:

没有答案
相关问题