error: property 'frame' not found on object of type 'UIView *'

前端 未结 7 413
庸人自扰
庸人自扰 2021-01-30 17:14

I\'m debugging my code and trying to figure out the size of the view using this:

p view.frame.size.height

but I\'m getting this error:

7条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-30 17:49

    If you hate typecasting every time, you can try this:

    (lldb) expr @import UIKit
    (lldb) po self.view.bounds
    

    Since Xcode 7.2 is now available, I think we should update the answer.
    I find the answer here, Why can't LLDB print view.bounds?

提交回复
热议问题