如何“排外”处理多点触摸事件
来源:互联网 发布:用手机发布淘宝宝贝 编辑:程序博客网 时间:2024/04/30 11:01
经常有网友问,如何避免同时处理多个多点触摸事件?实际上,在Apple的官方文档中已经提供了解决方案。
Apple在UIView的multipleTouchEnabled属性的讨论中提到:如果你希望这个视图“排外”处理多点触摸事件,只需要把组的这一属性,属性的值是multipleTouchEnabled和exclusivetouch的值同时设为YES。
multipleTouchEnabledA Boolean value that indicates whether the receiver handles multi-touch events.@property(nonatomic, getter=isMultipleTouchEnabled) BOOL multipleTouchEnabledDiscussionWhen 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.AvailabilityAvailable in iOS 2.0 and later.See Also @property exclusiveTouchRelated Sample CodeaurioTouch2Declared InUIView.h
0 0
- 如何“排外”处理多点触摸事件
- WPF4 多点触摸事件
- Android多点触摸事件捕获
- js多点触摸touch事件
- 检测手机多点触摸事件
- 11个处理触摸事件和多点触摸的JS库
- 11个处理触摸事件和多点触摸的JS库
- 11 个处理触摸事件和多点触摸的 JS 库
- <WEB>平板_手机开发_13 个处理触摸事件和多点触摸的JS 库
- 11 个处理触摸事件和多点触摸的 JS 库
- 11 个处理触摸事件和多点触摸的 JS 库
- 11 个处理触摸事件和多点触摸的 JS 库
- Android多点触摸交互处理
- Android多点触摸交互处理
- Android多点触摸交互处理
- Android多点触摸交互处理
- android 多点触摸交互处理
- IOS触摸事件处理(如何处理多个触摸点)
- Android Permission Denied
- 丢失了文件localhost.localdomain.pid和mysql.sock,怎么办?
- Objective-C:属性
- Vim简明教程【CoolShell】
- cocos2d学习之路四(添加遥控杆)
- 如何“排外”处理多点触摸事件
- Analyzing PDF Malware - Part 3A
- wifi 流程
- 台式机bios参数说明
- iOS UIWebView浏览器控件的简单实现
- Ubuntu 14.04 安装 Xilinx ISE 14.7 全过程
- winform中自带的仿百度下拉框的实现
- linux tar.gz zip 解压缩 压缩命令
- 基于MATLAB的图像处理程序