ios uibutton hidden: does this automatically make the button disabled? ios uibutton hidden: does this automatically make the button disabled? ios ios

ios uibutton hidden: does this automatically make the button disabled?


UIButton and all controls inherits common properties from UIView like hidden, backgroundColor, etc.

Class reference of UIView says if any view is hidden then it will not receive input events

Class reference of UIView says:

A hidden view disappears from its window and does not receive input events. It remains in its superview’s list of subviews, however, and participates in autoresizing as usual. Hiding a view with subviews has the effect of hiding those subviews and any view descendants they might have. This effect is implicit and does not alter the hidden state of the receiver’s descendants.

you can find this over Here.


It does. Setting the buttons hidden property to YES will disable any user interaction. This is true for other UI elements as well as just UIButton.


Yes you can't touch button when it is hidden.If you wanna touch it then you must make it btn.hidden = NO;. Hidden means disable the user interaction.