Hi there
Does someone know how the inactive done button in the Contacts App is done?
I would like to implement something similar.
So far I didn't saw any inactive property on UIBarButtonItem...
Hi there
Does someone know how the inactive done button in the Contacts App is done?
I would like to implement something similar.
So far I didn't saw any inactive property on UIBarButtonItem...
Use the enabled
property. Of course, you'll need to use your own validation checks on the input controls in your view controller, to determine whether or not to set it enabled.
// Assuming the Done button is on the right
[self.navigationItem.rightBarButtonItem setEnabled:NO]; // Disables the button
The enabled
property is found in UIBarItem
, the class from which UIBarButtonItem
inherits, which is why you won't find it in the UIBarButtonItem
docs.