【问题标题】:screen orientation like portrait and landscape in iphone屏幕方向,如 iPhone 中的纵向和横向
【发布时间】:2011-03-01 09:21:38
【问题描述】:

我是 iphone 开发新手。在这里,我想在 iphone 中像风景 porgrammaticaly 一样查看屏幕。我现在像纵向一样完成了,当我自动向左和向右转动时,我添加了一些图像和 pickerview 数据,这些也像纵向和横向屏幕一样显示到 iphone。

任何人都可以帮助我如何在 iphone 中以编程方式定位屏幕

提前谢谢你。

【问题讨论】:

    标签: iphone


    【解决方案1】:

    在你的课堂上使用这个方法。

    • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // 对于支持的方向返回 YES

      return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
      interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

    }

    【讨论】:

      猜你喜欢
      • 2015-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-13
      • 1970-01-01
      • 2012-08-17
      • 1970-01-01
      相关资源
      最近更新 更多