iOS事件传递

2019-10-11  本文已影响0人  三三At你

省略了部分系统事件

事件
hitTest-UIWindow
pointInside-UIWindow
pointInside-UIWindow YES
hitTest-UIView
pointInside-UIView
pointInside-UIView YES
hitTest-UIButton
pointInside-UIButton
pointInside-UIButton YES
hitTest-UIButton UIButton
hitTest-UIView UIButton
hitTest-UIWindow UIButton

响应
UIButton
UIView
ViewController
UIWindow
UIApplication
AppDelegate

//hitTest伪代码
:hitTest:view
  if pointInside(view) {
    for v in view.subView.reverse
      var rv = hitTest(v)
      if rv return v
  }
  return nil
上一篇 下一篇

猜你喜欢

热点阅读