本文共 1522 字,大约阅读时间需要 5 分钟。
UITableView ? iOS ??????????????????????????????????????????????? UITableView ???????????????
??????? UITableView ??????????
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES;} ????????????????????
??????????????????????
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete;} ???? UITableViewCellEditingStyleDelete ??????????
??????????????????????????
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { return @"????";} ??????????????????????
???????????????????????????
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath { return NO;} ??????????????????
?????????????????????????????
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { // ???????????? LiveCollectionModel *collectionModel = _dataArray[indexPath.row]; [_dataArray removeObject:collectionModel]; [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];} _dataArray ?????MBProgressHUD ??loading??????????????????????? UITableView ?????????????????????????????????????
转载地址:http://lclf.baihongyu.com/