iphone的responder chain

我们先看一张图,看看event被处理的顺序
iphone的responder chain_第1张图片
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。

你可能感兴趣的:(iphone的responder chain)