UIKit Dynamics with existing affine transform

后端 未结 4 668
我在风中等你
我在风中等你 2021-02-14 19:07

I have a view that has some scale transformations. And when I apply some UIKit Dynamics on it, it zeroes them out. /: How can I keep the existing transformation on the view whil

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-14 19:28

    I found the easiest way around this was to just apply the UIKitDynamics behaviours to a container view and apply the scaling/transforms to a subview within that container.

    This way you can also animate the transform while still applying the dynamic behaviour.

提交回复
热议问题