Instance Property


A Boolean value indicating whether the view controller currently allows the user to edit the view contents.


@property(nonatomic, getter=isEditing) BOOL editing;


If YES, the view controller currently allows editing; otherwise, NO.

If the view is editable and the associated navigation controller contains an edit-done button, then a Done button is displayed; otherwise, an Edit button is displayed. Clicking either button toggles the state of this property. Add an edit-done button by setting the custom left or right view of the navigation item to the value returned by the editButtonItem method. Set the editing property to the initial state of your view. Use the setEditing:animated: method as an action method to animate the transition of this state if the view is already displayed.

See Also

Adding Editing Behaviors to Your View Controller

- setEditing:animated:

Sets whether the view controller shows an editable view.


Returns a bar button item that toggles its title and associated state between Edit and Done.