开发者

delete button not showing in uitableview

开发者 https://www.devze.com 2023-03-08 15:29 出处:网络
I\'ve added UITableView to a UIViewController. T开发者_如何学Pythonhis ViewController is pushed to a navigationcontroller stack.

I've added UITableView to a UIViewController. T开发者_如何学Pythonhis ViewController is pushed to a navigationcontroller stack.

I've got an edit button in the tool bar but the delete buttons are not showing up in the cells.

When I hit edit, the edit button switched to a "done" state.

The following tableview method is entered. What would be a likely cause for the delete buttons not showing up?

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

    // Prevent new objects being added when in editing mode.
    [super setEditing:(BOOL)editing animated:(BOOL)animated];
    self.navigationController.navigationItem.rightBarButtonItem.enabled = !editing;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消