Menu

#607 consider to use an editButtonItem (refactoring idea)

iphone_1.10
open
nobody
None
5
2020-07-18
2017-09-05
No

Refactoring idea: consider to use an editButtonItem where applicapable.

Returns a bar button item that toggles its title and associated state between Edit and Done.
If one of the custom views of the navigationItem property is set to the returned object, the associated navigation bar displays an Edit button if editing is NO and a Done button if editing is YES. The default button action invokes the setEditing:animated: method.

Discussion

  • Christa Runge

    Christa Runge - 2020-07-18

    Candidates are (they have a setEditing: method):
    DBListViewController
    CatTableViewController
    CatEditViewController
    LabeledSwitchCell
    DBListCell
    DataFieldCell

     
  • Christa Runge

    Christa Runge - 2020-07-18

    Hmmm ... not sure if we really want this.
    1) DBListViewController and CatTableViewController: they have currently the "Edit" button on the right side in the navigation bar. However, in Edit mode, on the right side we have the '+' button, and the 'Done' button is on the left side.
    2) CatEditViewController: on leaving the view it invokes [self setEditing:NO...]. No other call related to editing the table view .

     

Log in to post a comment.