How to debug who is eating my touches in UIKit?

前端 未结 7 1600
孤街浪徒
孤街浪徒 2021-01-30 17:16

I can\'t figure out why tapping on text fields and buttons in my view is not working. I\'ve checked all the obvious things like whether userInteractionEnabled is set to YES, whe

7条回答
  •  青春惊慌失措
    2021-01-30 17:48

    You can debug that by using a symbolic breakpoint:

    -[UIWindow sendEvent:] & po $arg3

    Logs:

     timestamp: 179462 touches: {(
     phase: Began tap count: 1 force: 0.000 
    window: ; layer = > view: > location in window: {165.66665649414062, 232.33332824707031} previous location in window: 
    {165.66665649414062, 232.33332824707031} location in view: {165.66665649414062, 
    232.33332824707031} previous location in view: {165.66665649414062,232.33332824707031}
    )}
    

提交回复
热议问题