Applying scaling and rotation on a view using CGAffineTransform

前端 未结 4 751
轮回少年
轮回少年 2021-01-11 10:45

So I need to apply some scaling and some rotation to a view (I do this using gestures), so for each gesture I update the current scalling and rotation values with something

4条回答
  •  [愿得一人]
    2021-01-11 11:15

    For swift 3:

    view.transform = CGAffineTransform(rotationAngle:  CGFloat.pi).concatenating(CGAffineTransform(scaleX: 0.4, y: 0.4))
    

提交回复
热议问题