如果我想要po subView的超級視圖,當我使用subView.superView,它會抱怨沒有找到,但如果我使用[subView superView],po命令將運行良好,這是什麼原因?爲什麼lldb的po命令不能在dot中打印superview?
(lldb) po self.blackView.superview
error: property 'superview' not found on object of type 'UIView *'
error: 1 errors parsing expression
(lldb) po ((UIView*)self.blackView).superview
error: property 'superview' not found on object of type 'UIView *'
error: 1 errors parsing expression
(lldb) po [self.blackView superview]
<UIView: 0x15d53ce50; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x15d53cfc0>>
您正在使用哪種XCode版本? – Leo
當使用多個點時,LLDB解析問題。第一個會起作用,而第二個不會。 – Avi
@Leo使用Xcode 7.1 – ximmyxiao