【问题标题】:Set View LandscapeLeft (iPhone SDK)设置视图 LandscapeLeft (iPhone SDK)
【发布时间】:2011-02-19 13:19:07
【问题描述】:

大家好, 刚从 iPhone SDK 开始,我已经构建了一个简单的 iPhone 应用程序,它显示本地存储的网页,但我想让应用程序从侧面的 UIWebView 开始(横向左侧)。

我已经在 plist 中将Initial interface orientation 设置为Landscape (left home button),但是我如何实际旋转视图,因为当我加载它时,视图保持在纵向并且设备是横向的!

谢谢

【问题讨论】:

    标签: iphone objective-c sdk uiwebview rotation


    【解决方案1】:

    如果您想在用户移动他的 iPhone 时允许所有方向 只需将其添加到您的 UIViewController 中即可:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多