1 UITouch //位于window的view 里面. 2 //最后一次UITouch 的修改时间 3 @property(nonatomic,readonly) NSTimeInterval timestamp; 4 //手指的状态.如,开始移动,正在移动,移动结束,取消移动. 5 @property(nonatomic,readonly) UITouchPhase phase; 6 //手指按的次数. 7 @property(nonatomic,readonly) NSUInteger tapCount; 8 //一个窗口 9 @property(nonatomic,readonly,retain) UIWindow *window; 10 //窗口的视图下 11 @property(nonatomic,readonly,retain) UIView *view; 12 //当前位置. 13 - (CGPoint)locationInView:(UIView *)view; 14 //移动的起点 15 - (CGPoint)previousLocationInView:(UIView *)view; 16 //返回所有window 和view 上 UITouch的集合. 17 - (NSSet *)allTouches; 18 //返回某个window上的UITouch集合. 19 - (NSSet *)touchesForWindow:(UIWindow *)window; 20 //返回某个View 上的UITouch的集合. 21 - (NSSet *)touchesForView:(UIView *)view; 22 UIResponder//响应手指的移动. 23 //开始移动. 24 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 25 //移动了. 26 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; 27 //移动结束.(手指离开触摸屏) 28 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; 29 //取消移动 30 - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; 31 MultipleTouches 32 //UIView中的property 33 //是否允许多手指的移动对象.缺省默认为不允许. 34 BOOL multipleTouchEnabled; 35 /*If YES, the receiver blocks other views in the same window from receiving touch events; otherwise, it does not. The default value is NO.//如果YES,那接收者阻止其他视图接收窗口的触摸事件,否则就是否。默认值是NO。 36 */ 37 BOOL exclusiveTouch; 38 UIControlEvents 39 UIControlEventTouchDown 40 UIControlEventTouchDownRepeat 41 UIControlEventTouchDragInside 42 UIControlEventTouchDragOutside 43 UIControlEventTouchDragEnter 44 UIControlEventTouchDragExit 45 UIControlEventTouchUpInside 46 UIControlEventTouchUpOutside 47 UIControlEventTouchCancel 48 //Associating actions with UIControlEvents 49 - (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents; 50 - (void)removeTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents; 51 //action Signatures 52 - (void)performAction; 53 - (void)performAction:(id)sender; 54 - (void)performAction:(id)sender withEvent:(UIEvent *)event; 55 UIControl Touch Tracking 56 - (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event; 57 - (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event; 58 - (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event; 59 - (void)cancelTrackingWithEvent:(UIEvent *)event; 60 //Handling TouchEvents 61 - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
转载于:https://www.cnblogs.com/try2do-neo/archive/2011/09/23/2186090.html