iPhone — is it possible to inspect the frame of a UIView in the Xcode debugger?

前端 未结 12 564
执念已碎
执念已碎 2021-02-02 08:18

When the debugger is stopped at a breakpoint, I can\'t find the frame of any of my UIViews in there.

Is it possible to do this?

EDIT: starting a bounty due to th

12条回答
  •  走了就别回头了
    2021-02-02 08:27

    Re-formatting @EPage_Ed's answer because the original was hard-coded for his specific case:

    At the (lldb) prompt, type:

    print (CGRect)[view frame]
    

    Or, for the bounds:

    print (CGRect)[view bounds]
    

提交回复
热议问题