标签:ios 手势 不会执行touches
其实做外包也是挺不错,虽然累点,但是一天天的知识的扩展不少,下面是今天的收获
①初始化数组一字典的方法
@[] 初始化不可变数组
@{} 初始化不可变字典
②手势的使用
iOS中处理手势之前是用四个方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
UITapGestureRecognizer
//点击(可以设置点击次数)
UIPinchGestureRecognizer //二指往內或往外拨动,平时经常用到的缩放
UISwipeGestureRecognizer //滑动,快速移动
UIPanGestureRecognizer
//拖移,慢速移动
使用:
标签:ios 手势 不会执行touches
原文地址:http://blog.csdn.net/lv_ruanruan/article/details/41487353