Animation of CGAffineTransform in iOS8 looks different than in iOS7

前端 未结 6 1840
南方客
南方客 2021-02-02 11:59

I\'m trying to find a reason why animation of UIView transform property looks different in iOS 8 than iOS 6/7.

For a simple example, prior to iOS 8:

6条回答
  •  名媛妹妹
    2021-02-02 12:53

    I'm also experiencing the same issue with scaling. I guess it could be the same with rotation. Could you try this?

    myView.transform = CGAffineTransformConcat(myView.transform , CGAffineTransformMakeRotate(1.57));
    [UIView animateWithDuration:5 animations:^{
        myView.transform = CGAffineTransformTranslate(plane.transform, 100, 0);
    }];
    

    Maybe it's also necessary to use CGAffineTransformMakeTranslate and CGAffineTransformConcat that as well, I'm not sure.

    The worst part about this is: You would have to do if/else on iOS versions, because this would look weird on iOS 7. I hope this is getting fixed by Apple before or with iOS 8 release.

提交回复
热议问题