关闭

iphone的responder chain

702人阅读 评论(0) 收藏 举报
我们先看一张图,看看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。
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:382634次
    • 积分:4194
    • 等级:
    • 排名:第7601名
    • 原创:61篇
    • 转载:57篇
    • 译文:1篇
    • 评论:23条
    文章分类
    最新评论