//左滑点击之后执行事件
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
UILabel *qwe =[[UILabel alloc]initWithFrame:CGRectMake(120, 120, 260, 60)];
NSDateFormatter *formatter =[[NSDateFormatter alloc]init];
[formatter setDateFormat:@"yy-MM-dd HH:mm:ss"];
NSDate *date =[NSDate date];
NSString *nowTime =[formatter stringFromDate:date];
qwe.text =nowTime;
[mytable addSubview:qwe];
}
//按钮名称
- (nullable NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
{
return @"删除";
}
UITableview 左滑编辑
最新推荐文章于 2021-01-13 19:34:58 发布