ios开发怎么把collectionviewcell的点击事件抛出

2025-04-15 02:54:09
推荐回答(1个)
回答1:

点击后右边会出现删除按钮 -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } 自定义删除按钮 - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { NSString * a = @"删除"; return a; } 删除按钮的回调函数 -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { }