iPhone, hook for edit/done button click in table view

后端 未结 4 1569
说谎
说谎 2021-02-01 17:54

In my table view controller there is

self.navigationItem.leftBarButtonItem = self.editButtonItem;

which produces a regular edit/done button at

4条回答
  •  有刺的猬
    2021-02-01 18:30

    This is the standard way to get notified when a bar button has been pushed:

    self.editButtonItem.target = self;
    self.editButtonItem.action = @selector(buttonPushed:);
    
    ...
    
    - (void) buttonPushed:(id)sender
    {
    // do stuff here
    }
    

提交回复
热议问题