1.继承链:NSObject

2.获取触发点的位置

    (1)- (CGPoint)locationInView:(UIView *)view  :返回指定视图的触发点的位置

    (2)- (CGPoint)previousLocationInView:(UIView *)view  :返回指定视图的上一个触发点的位置

    (3)@property(nonatomic, readonly, strong) UIView*view  :读取当前被触摸的视图

    (4)@property(nonatomic, readonly, strong) UIWindow*window  :读取当前被触摸的窗口

    (5)@property(nonatomic, readonly) CGFloatmajorRadius  :读取触摸点的半径

    (6)@property(nonatomic, readonly) CGFloatmajorRadiusTolerance  :读取触摸点半径的精确值

    (7)- (CGPoint)preciseLocationInView:(UIView *)view  :读取指定视图被触摸的点的精确位置

    (8)- (CGPoint)precisePreviousLocationInView:(UIView *)view  :返回指定视图被触摸的上一个点的精确位置

3.获取触摸点的属性

    (1)@property(nonatomic, readonly) NSUIntegertapCount  :读取屏幕被点击的次数

    (2)@property(nonatomic, readonly) NSTimeIntervaltimestamp  :当发生触摸的开始时间或者是上一个 触摸点结束的时间

    (3)@property(nonatomic, readonly) UITouchTypetype  :返回触摸的类型

    (4)@property(nonatomic, readonly) UITouchPhasephase  :读取触摸的阶段

    (5)@property(nonatomic, readonly) CGFloatforce  :触摸点受压的力度

    (6)@property(nonatomic, readonly) CGFloatmaximumPossibleForce  :触摸点最大合理受压的力度

    (7)@property(nonatomic, readonly) CGFloataltitudeAngle  :

  • 当笔平行于平面时,该值为0
  • 当笔垂直于平面时,该值为Pi / 2

,A value of 0 radians indicates that the stylus is parallel to the surface; when the stylus is perpendicular to the surface, altitudeAngle is Pi/2.

    (8)- (CGFloat)azimuthAngleInView:(UIView *)view  :沿着x轴正向的方位角,当与x轴正向方向相同时,该值为0

    (9)- (CGVector)azimuthUnitVectorInView:(UIView *)view  :当前触摸对象的方向上的单位向量当view参数为nil时,默认为keyWindow

    (10)@property(nonatomic, readonly) UITouchPropertiesestimatedProperties  :当前触摸对象估计的触摸特性,返回值是UITouchPropertyies

    (11)@property(nonatomic, readonly) NSNumber*estimationUpdateIndex  :当每个触摸对象的触摸特性发生变化时,该值将会单独增加,返回值是NSNumber

    (12)@property(nonatomic, readonly) UITouchPropertiesestimatedPropertiesExpectingUpdates  :获取被期望要输入记性更新的一连串触发点属性

3.获取触摸对象的手势识别器

    (1)@property(nonatomic, readonly, copy) NSArray<UIGestureRecognizer *> *gestureRecognizers  :读取触摸对象接收的手势识别器组成的数组

4.在sprite kit框架里面使用触摸事件

    (1)- (CGPoint)locationInNode:(SKNode *)node  :返回一个在指定节点上的当前位置

    (2)- (CGPoint)previousLocationInNode:(SKNode *)node  :返回一个在指定节点上的前一个位置

5.辅助常量

    (1)UIForceTouchCapability常量

UIForceTouchCapabilityUnknown = 0,  :无法检测压力的大小

UIForceTouchCapabilityUnavailable = 1,  :无法使用受压检测的能力

UIForceTouchCapabilityAvailable = 2  :可以使用受压检测的能力

    (2)UITouchType的常量

     UITouchTypeDirect,  :来自屏幕点击的直接触摸

    UITouchTypeIndirect,  :不是来自屏幕的间接触摸

    UITouchTypeStylus  :来自触摸笔的触摸

    (3)UITouchProperties常量

UITouchPropertyForce = (1UL << 0),  :

UITouchPropertyAzimuth = (1UL << 1),

UITouchPropertyAltitude = (1UL << 2),

UITouchPropertyLocation = (1UL << 3),

    (4)UITouchPhase常量

UITouchPhaseBegan,  :触摸开始

UITouchPhaseMoved,  :触摸移动

UITouchPhaseStationary,  :触摸静止

UITouchPhaseEnded,  :触摸结束

UITouchPhaseCancelled,  :触摸取消

UIKit框架之UITouch的更多相关文章

  1. UIKit 框架之UIView二

    下面这些都是UIView一些基本的东西,具体的可以参考UIKit 框架之UIView一博客 一.自定义一个View // // MyView.m // UIView // // Created by ...

  2. UIKit框架使用总结--看看你掌握了多少

    一.经常使用的,基本就是每次项目迭代都需要使用的 UIView.UILabel.UIImage.UIColor.UIFont.UIImageView.UITextField.UIButton. UIS ...

  3. Swift - 重写UIKit框架类的init初始化方法(以UITabBarController为例)

    原来写了篇文章讲UITabBarController的用法,当时是从UIViewController跳转到UITabBarController页面,代码如下: 1 self.presentViewCo ...

  4. UIKit框架

    在今后的应用程序构建中,会陆续使用各式各样的控件,因此UIKit框架的引入是必不可少的! 一.简介 UIKitk框架提供一系列的Class(类)来建立和管理iPhone OS应用程序的用户界面接口.应 ...

  5. iOS学习32之UIKit框架-可视化编程-XIB

    1. Interface Builder 可视化编程 1> 概述 GUI : 图形用户界面(Graphical User Interface, 简称GUI, 又称图形化界面) 是指采用图形方式显 ...

  6. 基础框架Fundation和UIkit框架的定义和使用

    Foundation 框架为所有应用程序提供基本的系统服务 您的应用程序以及 UIKit 和其他框架,都建立在 Foundation 框架的基础结构之上.Foundation 框架提供许多基本的对象类 ...

  7. iOS开发概述UIkit动力学,讲述UIKit的Dynamic特性,UIkit动力学是UIkit框架中模拟真实世界的一些特性。

    转发:http://my.oschina.net/u/1378445/blog/335014 iOS UIKit动力学 Dynamics UIAttachmentBehavior 实现iMessage ...

  8. iOS开发UIKit框架-可视化编程-XIB

    1. Interface Builder 可视化编程 1> 概述 GUI : 图形用户界面(Graphical User Interface, 简称GUI, 又称图形化界面) 是指采用图形方式显 ...

  9. 79、iOS 的Cocoa框架、Foundation框架以及UIKit框架

    Cocoa框架是iOS应用程序的基础 1. Cocoa是什么? Cocoa是 OS X和ios 操作系统的程序的运行环境. 是什么因素使一个程序成为Cocoa程序呢?不是编程语言,因为在Cocoa开发 ...

随机推荐

  1. js数组倒叙输出

    第一种:是直接利用代码进行输出 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"&g ...

  2. aliyun source.list

    电信的网络越来越不靠普.ubuntu环境使用下面的source.list deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted un ...

  3. php知识案列

     n个不重复的随机数生成代码 <?php //range 是将1到100 列成一个数组 $numbers = range (1,100); //shuffle 将数组顺序随即打乱 shuffle ...

  4. The type String cannot be constructed. You must configure the container to supply this value.

    利用 Enterprise Library 5.0 Microsoft.Practices.EnterpriseLibrary.Common Microsoft.Practices.Enterpris ...

  5. centos 6安装epel

    1.通过:https://mirrors.ustc.edu.cn/找到epel rpm包链接,这里的是 https://mirrors.ustc.edu.cn/epel/epel-release-la ...

  6. HDU 4944 FSF’s game(2014 Multi-University Training Contest 7)

    思路:  ans[n]=  ans[n-1] + { (n,1),(n,2).....(n,n)}  现在任务 是 计算  { (n,1),(n,2).....(n,n)}(k=n的任意因子) 很明显 ...

  7. Android中的颜色设置

    1.在android中经常看到设置的颜色为八位的十六进制的颜色值,例如 public static final class color { public static final int lightb ...

  8. JavaScript 对象的创建

    Object类型是JavaScript中使用最多的一种类型.创建Object实例的方式有多种,接下来一一列举. 1. Object构造函数 person1的friends属性修改影响了person2的 ...

  9. Jupyter notebook 配置目录

    默认打开Jupyter notebook,工作目录是C:\Users\Username,这里面有很多其它与Jupyter notebook无关的文件,也很有用,不能看着烦就删掉,所以需要修改Jupyt ...

  10. DLL 导出封装类

    首先使用Wizard创建一个Win32 Dynamic-Link Library工程,然后定义一个简单的C++类CInDLL.由于该类会被工程之外的文件所引用,所以需要对这个类进行引出.因为只有引出后 ...