I have a button and would like to know its enabled state while stepping through code. This doesn't work in the debugger:
po self.myButton.enabled
It prints:
There is no member named enabled.
Is there another way to print out its state?
I have a button and would like to know its enabled state while stepping through code. This doesn't work in the debugger:
po self.myButton.enabled
It prints:
There is no member named enabled.
Is there another way to print out its state?
gdb doesn't know dot-syntax for properties, but it will evaluate method calls. -[UIButton enabled] returns a BOOL, which is a scalar type, not an object, so you should use p
with a type cast, like this:
p (BOOL)[[self myButton] enabled]
If the property you want to inspect is an object, you can use po
without the type cast, like this:
po [[self myButton] font]