在我的课堂上,我有一个财产
@property (nonatomic, retain) UIBarButtonItem *allMediaButton;
在我的代码中,我使用setEnabled:
setter 启用和禁用此控件。
但是在调试窗口中我无法检查属性值
我以不同的方式尝试过:
(lldb) po (UIBarItem*)appdelegate.detailViewController.allMediaButton
(UIBarItem *) $1 = 0x08302ed0 <UIBarButtonItem: 0x8302ed0>
(lldb) po (UIBarItem*)appdelegate.detailViewController.allMediaButton.enabled
error: property 'enabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
(lldb) expr (UIBarItem*)appdelegate.detailViewController.allMediaButton.enabled
error: property 'enabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
(lldb) expr ((UIBarItem*)appdelegate.detailViewController.allMediaButton).enabled
error: property 'enabled' not found on object of type 'UIBarItem *'
error: 1 errors parsing expression
(lldb) expr ((UIBarItem*)appdelegate.detailViewController.allMediaButton).enabled
error: property 'enabled' not found on object of type 'UIBarItem *'
error: 1 errors parsing expression
(lldb) po ((UIBarItem*)appdelegate.detailViewController.allMediaButton).enabled
error: property 'enabled' not found on object of type 'UIBarItem *'
error: 1 errors parsing expression
(lldb) po ((UIBarItem*)appdelegate.detailViewController.allMediaButton).isEnabled
error: property 'isEnabled' not found on object of type 'UIBarItem *'
error: 1 errors parsing expression
(lldb) expr ((UIBarItem*)appdelegate.detailViewController.allMediaButton).isEnabled
error: property 'isEnabled' not found on object of type 'UIBarItem *'
error: 1 errors parsing expression
(lldb) expr appdelegate.detailViewController.allMediaButton.isEnabled
error: property 'isEnabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
(lldb) po appdelegate.detailViewController.allMediaButton.isEnabled
error: property 'isEnabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
(lldb) po appdelegate.detailViewController.allMediaButton.enabled
error: property 'enabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
(lldb) expr appdelegate.detailViewController.allMediaButton.enabled
error: property 'enabled' not found on object of type 'UIBarButtonItem *'
error: 1 errors parsing expression
如何查看房产的价值?
更新: po @() 也不起作用:
(lldb) po @([[[appdelegate detailViewController] allMediaButton] isEnabled])
error: no known method '-isEnabled'; cast the message send to the method's return type
error: 1 errors parsing expression
(lldb) po @([(UIBarItem)[[appdelegate detailViewController] allMediaButton] isEnabled])
error: C-style cast from 'UIBarButtonItem *' to 'UIBarItem' is not allowed
error: 1 errors parsing expression
(lldb) po @([(UIBarItem*)[[appdelegate detailViewController] allMediaButton] isEnabled])
error: no known method '-isEnabled'; cast the message send to the method's return type
error: 1 errors parsing expression
(lldb) po @([((UIBarItem*)[[appdelegate detailViewController] allMediaButton]) isEnabled])
error: no known method '-isEnabled'; cast the message send to the method's return type
error: 1 errors parsing expression