【问题标题】:Flip view controller horizontally while in landscape mode on the iPad在 iPad 上处于横向模式时水平翻转视图控制器
【发布时间】:2011-08-27 14:35:55
【问题描述】:

我的 iPad 应用设置为横向模式。我尝试使用setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal 让视图控制器水平翻转,但这样做就好像它仍然是纵向的一样。有没有办法解决这个问题?

【问题讨论】:

  • 这里需要什么?无论 iPad 上的当前方向是什么,该应用程序从一开始就只能处于横向模式?

标签: iphone objective-c xcode ipad viewcontroller


【解决方案1】:

http://aseriesoftubes.com/articles/ipad-development-101-orientation/

查看此示例教程.. 它会帮助你..

在视图之间切换将是您的解决方案...

【讨论】:

    【解决方案2】:

    您是否想过像这样将模态视图设置为陆地空间模式:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        // Return YES for supported orientations
        return UIInterfaceOrientationIsLandscape(interfaceOrientation);
    }
    

    【讨论】:

    • 是的,不幸的是。你认为这会正常修复它吗?这是否意味着其他地方可能存在错误?
    • 嗯,好吧,我现在明白你的意思了(我总是与水平轴对称混淆)。这似乎是不可能的:stackoverflow.com/questions/5601317/…。你必须自己做。
    猜你喜欢
    • 1970-01-01
    • 2014-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多