iphone的responder chain

我们先看一张图,看看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。
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭