UITableView Swipe to delete: how to customize button and action?

后端 未结 1 1732
鱼传尺愫
鱼传尺愫 2021-01-01 00:59

I want to perform different action, not delete objects but archive them. When user swiped on tableViewCell I need to show \"Archive\" instead of delete. change \"Delete\" b

相关标签:
1条回答
  • 2021-01-01 01:49

    Apparently in 3.0 and later there is such method:

    - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
    
    0 讨论(0)
提交回复
热议问题