【问题标题】:Force willAnimateRotationToInterfaceOrientation method强制 willAnimateRotationToInterfaceOrientation 方法
【发布时间】:2011-02-14 09:56:17
【问题描述】:

我想在我的应用程序启动时调用 willAnimateRotationToInterfaceOrientation 方法,如何强制执行此方法? 只有当我现在旋转设备时才会调用它:(

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

一个细节......当设备处于水平模式时它被调用但是当我以垂直模式启动设备时这个方法永远不会被调用:(

【问题讨论】:

    标签: iphone objective-c ipad orientation autorotate


    【解决方案1】:

    为什么不在 Info.plist 文件中将方向设置为 UISupportedInterfaceOrientations?

    【讨论】:

      猜你喜欢
      • 2018-10-21
      • 2013-09-27
      • 2011-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-03
      • 2010-10-21
      • 2013-10-31
      相关资源
      最近更新 更多