【问题标题】:UIImageView jumps down/right when scalingUIImageView 在缩放时向下/向右跳跃
【发布时间】:2013-12-03 21:43:39
【问题描述】:

我正在尝试从其中心缩放 UIImageView。中心刻度有效,但我有一个问题!当我触摸图像时,它会在缩放时向下/向右跳跃。

这是我的代码:

[UIView animateWithDuration:0.5
                          delay:1
                        options:UIViewAnimationOptionBeginFromCurrentState
                     animations:(void (^)(void)) ^{
                        elefant.transform = CGAffineTransformMakeScale(1.5, 1.5);
                     }
                     completion:^(BOOL finished){
                         //elefant.transform=CGAffineTransformIdentity;
                     }];

注意:当我显示此 UIImageView 的尺寸检查器时,原点有一个从左上角向下和向右的箭头。我试图建立这个中心,但没有帮助。

希望能在这里得到帮助,提前致谢。

/巨魔

【问题讨论】:

    标签: ios objective-c xcode uiimageview xcode5.0.1


    【解决方案1】:

    为了解决这个问题,我不得不关闭自动布局。

    【讨论】:

      猜你喜欢
      • 2013-01-29
      • 2020-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多