- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section==0)
{
return NO;
}
else
{
return YES;
}
}
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle ==UITableViewCellEditingStyleDelete)
{
[IanAlert confirmWithTitle:@"温馨提示" message:@"是否要删除该条信息" yes:@"确定" actionYes:^
{
NSLog(@"你点击了确定的按钮");
} andno:@"取消" actionNo:^
{
}];
}
}
-(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
{
return @"删除";
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section==0)
{
if (indexPath.row==2)
{
MLLZhiDingAccountViewController*accountVC=[[MLLZhiDingAccountViewController alloc]init];
[self.navigationController pushViewController:accountVC animated:YES];
}
}
}
网友评论