iphone - 在纵向 View Controller 之后呈现横向 View Controller

标签 iphone uiviewcontroller landscape portrait

我有一个始终处于纵向模式的主视图 Controller 。

然后我想呈现ModalViewController,但它将来自横向的左侧(而不是来自屏幕底部)。

可能吗?

tnx

最佳答案

在模态视图 Controller 实现中,覆盖-shouldAutorotateToInterfaceOrientation:

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

关于iphone - 在纵向 View Controller 之后呈现横向 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1906280/

相关文章:

ios - 共享扩展程序未出现在能够在 iPhone 上共享照片的应用程序列表中

iphone - 在 AppDelegate 完成加载之前,我的 iPhone 应用程序在加载时崩溃

iphone - 我可以使用相同的方法传入不同的 UIViewController 子类吗?

ios - 将数据从第一个 VC 传递到第三个 (Swift)

iPhone SDK : Delegate method not getting called-Troubleshooting

ios - 在模态转换中转换 AVplayer

Android TimePicker 在横向模式下显示不佳

iPhone 横屏常见问题及解决方案

iphone - Xcode 4.5.2 : How to correctly program a CGRectMake?

iphone - iOS Bonjour 设备连接限制?