您的位置:首页 > 移动开发 > IOS开发

左滑删除,iOScell设置

2016-07-05 15:40 344 查看
发个广告:ios开发两年了,一步步走来  关注公众号一起进步


左滑删除

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

{

    returnYES;

}

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

{

    if (editingStyle ==UITableViewCellEditingStyleDelete) {

        

        [self.courseArrayremoveObjectAtIndex:indexPath.row];

        [self.ui_tableViewdeleteRowsAtIndexPaths:[NSArrayarrayWithObject:indexPath]withRowAnimation:UITableViewRowAnimationFade];

    }

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  uitableview ios