fastred / SloppySwiper

UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not just from the edge).
MIT License
806 stars 107 forks source link

Support force touch(3D Touch) device's #8

Closed yusuga closed 9 years ago

yusuga commented 9 years ago

Timing -touchesMoved:withEvent: is called has been changed on a force touch(3D Touch) supported device's.


Touch the screen. (It does not move the finger)

I have verified the following device's.

iPhone4s(iOS9.0.0) (Does not support force touch)

-touchesBegan:withEvent:

iPhone6s

-touchesBegan:withEvent:
-touchesMoved:withEvent:

-touchesMoved:withEvent: is called by the movement to the z-axis direction in force touch(3D Touch) supported device's. Here is changing only the value of -[UITouch force]. Because only -[UITouch force] is changed here, -velocityInView: returns CGPointZero.

I added confirmation of CGPointZero to prevent this.

fastred commented 9 years ago

Thanks for the PR and a thorough explanation!

fastred commented 9 years ago

:sparkles: