iphone的responder chain

来源:互联网 发布:什么是数据帧 编辑:程序博客网 时间:2024/06/05 06:36
我们先看一张图,看看event被处理的顺序

The general path of an event up the responder chain starts with a view—the first responder or the view under the mouse pointer or finger. From there, it proceeds up the view hierarchy to the window object and then to the global application object.However, the responder chain for events in iOS adds a variation to this path: If a view is managed by a view controller and if the view cannot handle an event, the view controller becomes the next responder.
一般来说first responder就是主表或者指头触摸到的控件
iphone中,responder chain为view->(view controller->)parent view(->parent view controller)->window->application。
原创粉丝点击