ios - Simulate UIScrollView Deceleration -


i have uipangesturerecognize use change frame of view. there way simulate deceleration of uiscrollview or uitableview when gesture's state uigesturerecognizerstateended? here current code:

if (pangesture.state == uigesturerecognizerstateended) {     [uiview animatewithduration:0.25 delay:0 options:uiviewanimationoptionbeginfromcurrentstate animations:^{     self.view.frame = cgrectmake(182, 0, self.view.frame.size.width, self.view.frame.size.height); }                  completion:^(bool finished) {                      if (finished) {                         //do                      }                  }]; } 

but not smooth scroll. decelerates until stops point i've set. thanks

session 223 @ wwdc 2012, "enhancing user experience scroll views", covered method use scrollview's behavior , "feel" animate position of different view (without scrollview ever being visible user).

the benefit of method shown in session deceleration match uiscrollview's, , forever.

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


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -