【问题标题】:Change orientation on tapping Imageview iPhone在点击 Imageview iPhone 时更改方向
【发布时间】:2011-12-13 19:05:35
【问题描述】:

我是一名新的 iOs 开发人员。我创建了一个使用 UIImage 视图的 iPhone 应用程序。我在 imageview 上设置了一个 example.png。当用户点击图像时,我想在横向模式下更改屏幕方向并在横向屏幕上设置全屏图像。我该怎么做。请帮帮我。预先感谢。

【问题讨论】:

    标签: iphone uiimageview screen-orientation


    【解决方案1】:

    首先你必须为 ImageView 定义 Frame。然后获取Imageview的Touch事件。

    现在,如果用户触摸 ImageView,则将 UIView 的 Frame 设置为 LandScape 模式,OtherWise 设置为 Portrait 模式。

    【讨论】:

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