UIResponder(iOS 常见的事件)

1.触摸事件


/** 当手指开始滑动 */

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

/** 当手指正在移动 */

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

/** 当手指离开屏幕 */

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

/** 当被中断的时候 */

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event



2.加速计事件

/** 开始感应 */

- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event

/** 摇晃过程 */

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event

/** 摇晃中断 */

- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event



3.远程控制事件

-(void)remoteControlReceivedWithEvent:(UIEvent *)event


原文地址:https://www.cnblogs.com/miaomiaoshen/p/5188627.html