【问题标题】:How it is possible to 'rotate image, only if it is in portrait mode (But not in landScape mode)'如何“旋转图像,仅在纵向模式下(但不是在横向模式下)”
【发布时间】:2012-11-10 12:22:49
【问题描述】:

在我的 iphone 应用程序中我使用图像视图来显示放大的图像,从另一个视图获取

第一个视图中,我有一个指定的位置用于显示从 imagePicker 捕获的图像Here images are displayed in correct orientation what we captured

(第二个)详细视图中,我有一个大的 (3x4) 图像视图以大尺寸显示捕获的图像(Here ALSO images are displayed in correct orientation what we captured) em>

但是

我的要求是我需要在 3x4 像素比例的图像视图中显示大图像,

为此

如果横向模式下的图像按方向显示,

如果是纵向模式,我们需要将其旋转为横向 (90˚)。

如何rotate image , ONLY IF it is in portrait mode (But not in landScape mode)

【问题讨论】:

    标签: iphone objective-c uiimageview uiimage uiimagepickercontroller


    【解决方案1】:

    您需要做的就是检查图像的高度和宽度大小。如果图像的高度大于单击的图像的宽度,则表示您已以纵向模式拍摄图像。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-26
      • 2016-12-13
      相关资源
      最近更新 更多