iOS手势篇(九)-UIRotationGestureRecognizer详解

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_18683985/article/details/84101407

UIRotationGestureRecognizer是iOS中的一个比较常用的旋转手势.常见于相册以及图片查看操作中.

// Begins:  when two touches have moved enough to be considered a rotation
// Changes: when a finger moves while two fingers are down
// Ends:    when both fingers have lifted

开始:当两个UITouch对象(两根手指)移动到足以被识别为旋转的时候
改变:当两个手指保持在屏幕上并且至少一根手指在移动
结束:当两根手指都离开屏幕了就算结束了

属性

@property (nonatomic)          CGFloat rotation;            // rotation in radians
@property (nonatomic,readonly) CGFloat velocity;            // velocity of the pinch in radians/second
属性 默认值 说明
rotation 0.0 该值是是旋转手势的旋转值,是一个随着时间变换的量,不需要做累加等操作.可以赋值,赋值后速度’velocity’会被重置
velocity 0.0 旋转手势的旋转速率

猜你喜欢

转载自blog.csdn.net/qq_18683985/article/details/84101407