私のクラスにはプロパティがあります
@property (nonatomic, retain) UIBarButtonItem *allMediaButton;
私のコードでは、setEnabled:
セッターを使用してこのコントロールを有効および無効にします。
しかし、デバッグウィンドウではプロパティ値を確認できません
私はさまざまな方法でそれを試しました:
(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