【问题标题】:Image Resize when rotate using UIRotationGestureRecognizer in iphone application在 iphone 应用程序中使用 UIRotationGestureRecognizer 旋转时调整图像大小
【发布时间】:2011-02-01 07:59:37
【问题描述】:

我在使用 viewForZoomingInScrollView 调整图像大小时添加了一个 ScrollView 之后我使用 UIRotationGestureRecognizer 旋转图像,图像会自动调整大小,所以这个问题的任何解决方案。

在这里我放了缩放和旋转的代码: - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{ 返回照片; }

/*响应旋转手势,以识别器给出的旋转显示图像视图,然后在旋转回水平时使其淡出到位。 */ - (void)handleRotationFrom:(UIRotationGestureRecognizer *)recognizer {

CGAffineTransform transform = CGAffineTransformMakeRotation([recognizer rotation]);
Photo.transform = transform;    

}

【问题讨论】:

  • 那么这里的问题是什么?

标签: iphone


【解决方案1】:

实现类EditImageView

在那边处理触摸以跟踪触摸。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-11
    • 2017-08-22
    • 1970-01-01
    • 2012-10-04
    相关资源
    最近更新 更多