本文主要是介绍UIResponder类,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
UIResponder类定义了对象相应和控制事件的接口,他是UIApplication、UIView的超类,这类的实例通常被称为应答对象。主要的时间控制方法:
touchesBegan:withEvent:通知调用者当有一根或者多根手指触摸到了视图或者窗口
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event: 通知接收者当系统发出取消事件的时候(比如低内存消耗的警告框)
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event :当一个触摸事件结束时发出的UITouch实例对象
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event :告诉接收者一个或者多个手指在视图或者窗口上触发移动事件。默认不允许多点触摸。如果要接收多点触摸事件你必须发setMultipleTouchEnabled: 这个消息给接收的视图实例对象并传递YES参数。
转自http://blog.sina.com.cn/s/blog_7ed5aa9901015et6.html
这篇关于UIResponder类的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!