iOS的事件派发

 dispatchPreprocessedEventFromEventQueue

先定位;hittest

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1

  * frame #0: 0x000000010574e565 XibGooo`-[XView hitTest:withEvent:](self=0x00007fddacd1b890, _cmd="hitTest:withEvent:", point=(x = 109, y = 135.5), event=0x000060000033df80) at XView.m:20

    frame #1: 0x0000000109dffff7 UIKitCore`-[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 87

    frame #2: 0x0000000109dffed1 UIKitCore`__38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 121

    frame #3: 0x00000001069f7c9c CoreFoundation`-[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 476

    frame #4: 0x0000000109dffa80 UIKitCore`-[UIView(Geometry) hitTest:withEvent:] + 460

    frame #5: 0x0000000109dffff7 UIKitCore`-[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 87

    frame #6: 0x0000000109dffed1 UIKitCore`__38-[UIView(Geometry) hitTest:withEvent:]_block_invoke + 121

    frame #7: 0x00000001069f7c9c CoreFoundation`-[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 476

    frame #8: 0x0000000109dffa80 UIKitCore`-[UIView(Geometry) hitTest:withEvent:] + 460

    frame #9: 0x0000000109dffff7 UIKitCore`-[UIView(Geometry) _hitTest:withEvent:windowServerHitTestWindow:] + 87

    frame #10: 0x0000000109983d44 UIKitCore`-[UIWindow _hitTestLocation:inScene:withWindowServerHitTestWindow:event:] + 194

    frame #11: 0x0000000109983a79 UIKitCore`__70+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:]_block_invoke + 159

    frame #12: 0x000000010998377b UIKitCore`+[UIWindow _topVisibleWindowPassingTest:] + 506

    frame #13: 0x000000010998397c UIKitCore`+[UIWindow _hitTestToPoint:forEvent:windowServerHitTestWindow:screen:] + 245

    frame #14: 0x0000000109983ede UIKitCore`-[UIWindow _targetWindowForPathIndex:atPoint:forEvent:windowServerHitTestWindow:onScreen:] + 200

    frame #15: 0x0000000109a20c6a UIKitCore`__startNewUITouch + 658

    frame #16: 0x0000000109a208ad UIKitCore`____updateTouchesWithDigitizerEventAndDetermineIfShouldSend_block_invoke.59 + 239

    frame #17: 0x0000000109a2e739 UIKitCore`_UIEventHIDEnumerateChildren + 123

    frame #18: 0x0000000109a1fe13 UIKitCore`__updateTouchesWithDigitizerEventAndDetermineIfShouldSend + 773

    frame #19: 0x0000000109a24db0 UIKitCore`__dispatchPreprocessedEventFromEventQueue + 1013

    frame #20: 0x0000000109a281cb UIKitCore`__handleEventQueueInternal + 5948

    frame #21: 0x0000000106a34721 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

在发送;window sendevent

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1

  * frame #0: 0x000000010574e4ed XibGooo`-[XView touchesBegan:withEvent:](self=0x00007fddacd1b890, _cmd="touchesBegan:withEvent:", touches=1 element, event=0x000060000033df80) at XView.m:15

    frame #1: 0x0000000109970dff UIKitCore`-[UIWindow _sendTouchesForEvent:] + 2052

    frame #2: 0x00000001099727a0 UIKitCore`-[UIWindow sendEvent:] + 4080

    frame #3: 0x0000000109950394 UIKitCore`-[UIApplication sendEvent:] + 352

    frame #4: 0x0000000109a255a9 UIKitCore`__dispatchPreprocessedEventFromEventQueue + 3054

    frame #5: 0x0000000109a281cb UIKitCore`__handleEventQueueInternal + 5948

    frame #6: 0x0000000106a34721 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

后委托;next responder

猜你喜欢

转载自www.cnblogs.com/feng9exe/p/10904540.html