如何“排外”处理多点触摸事件
2014-04-10 11:36
330 查看
经常有网友问,如何避免同时处理多个多点触摸事件?实际上,在Apple的官方文档中已经提供了解决方案。
Apple在UIView的multipleTouchEnabled属性的讨论中提到:如果你希望这个视图“排外”处理多点触摸事件,只需要把组的这一属性,属性的值是multipleTouchEnabled和exclusivetouch的值同时设为YES。
Apple在UIView的multipleTouchEnabled属性的讨论中提到:如果你希望这个视图“排外”处理多点触摸事件,只需要把组的这一属性,属性的值是multipleTouchEnabled和exclusivetouch的值同时设为YES。
multipleTouchEnabled A Boolean value that indicates whether the receiver handles multi-touch events. @property(nonatomic, getter=isMultipleTouchEnabled) BOOL multipleTouchEnabled Discussion When set to YES, the receiver receives all touches associated with a multi-touch sequence. When set to NO, the receiver receives only the first touch event in a multi-touch sequence. The default value of this property is NO. Other views in the same window can still receive touch events when this property is NO. If you want this view to handle multi-touch events exclusively, set the values of both this property and the exclusiveTouch property to YES. Availability Available in iOS 2.0 and later. See Also @property exclusiveTouch Related Sample Code aurioTouch2 Declared In UIView.h
相关文章推荐
- opencv 背景差分
- 使用CAShapeLayer与UIBezierPath画出想要的图形
- Android中Spinner下拉列表(使用ArrayAdapter和自定义Adapter实现) .
- 感恩父母,感谢生活
- IE阻止了此网站安装ActiveX控件
- Activity的启动模式
- JUnit 4 学习笔记
- Socket的通信流程图
- SQL2008排名函数
- JavaScript isPrototypeOf和hasOwnProperty使用区别
- UML安装
- IE阻止了此网站安装ActiveX控件
- C#委托与事件
- C#基础——谈谈.NET异步编程的演变史
- java 3.3 rectangle square
- Sublime Text2 中文乱码处理
- HDU 2102 A计划 (bfs + 判重)
- 博客搬迁
- redis 批量导入
- 2013计算机视觉代码合集三