Simulate UIScrollView Deceleration

后端 未结 2 805
后悔当初
后悔当初 2021-01-03 11:08

I have an UIPanGestureRecognize which I use to change the frame of a view. Is there a way to simulate the deceleration of the UIScrollView or

2条回答
  •  梦谈多话
    2021-01-03 11:49

    Session 223 at WWDC 2012, "Enhancing User Experience With Scroll Views", covered a method to use a scrollview's behavior and "feel" to animate the position of a different view (without the scrollview ever actually being visible to the user).

    The benefit of the method shown in the session is that your deceleration would always match UIScrollView's, now and forever.

    https://developer.apple.com/videos/wwdc/2012/?id=223

提交回复
热议问题