Instance Method

setEditing:animated:

Sets whether the view controller shows an editable view.

Declaration

- (void)setEditing:(BOOL)editing animated:(BOOL)animated;

Parameters

editing

If YES, the view controller should display an editable view; otherwise, NO.

If YES and one of the custom views of the navigationItem property is set to the value returned by the editButtonItem method, the associated navigation controller displays a Done button; otherwise, an Edit button.

animated

If YES, animates the transition; otherwise, does not.

Discussion

Subclasses that use an edit-done button must override this method to change their view to an editable state if editing is YES and a non-editable state if it is NO. This method should invoke super’€™s implementation before updating its view.

See Also

Adding Editing Behaviors to Your View Controller

editing

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

editButtonItem

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