Ui16-触摸事件与UIResponder

来源:互联网 发布:华为java编程规范试题 编辑:程序博客网 时间:2024/06/15 14:33


//一根手指或多跟手指触摸屏幕。

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;

//一根手指或多根手指在屏幕上移动(随着手指的移动,相关的对象会持续发送该消息)

-(void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;

//一根手指或多根手指离开屏幕

-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;

//在触摸操作结束前,被某个系统事件(例如接有电话打进来)打断了触摸过程

-(void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;



原创粉丝点击