테이블 뷰에 커스터마이징된 셀이 붙어 있을때,


셀을 밀어서 삭제하기 위한 방법을 찾고 있다





정상 작동하는 타 프로그램에서 찾은 방법


- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(nonnull NSIndexPath *)indexPath {

    return YES;

}



- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(nonnull NSIndexPath *)indexPath {

    NSString *pSeq = [[pDataBase.recordListArray objectAtIndex:indexPath.row]objectForKey:@"SEQ"];

    

    // 레코드 삭제

    [pDataBase deleteRecordData:pSeq];

    

    [pDataBase.recordListArray removeObjectAtIndex:indexPath.row];

    [pListView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:(UITableViewRowAnimationFade)];

}





Posted by 스타켄지니어
,