#pragma mark---删除地址按钮的点击方法
-(void)deleteClick:(UIButton *)btn WithEvent:(id)event{
NSLog(@"tag值---%ld",btn.tag);
NSSet *touches =[event allTouches];
UITouch *touch =[touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:self.myTableView];
NSIndexPath *indexPath= [self.myTableView indexPathForRowAtPoint:currentTouchPosition];
[self.myTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[self.placeArr removeObjectAtIndex:btn.tag];
//刷新第一组
NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:1];
[self.myTableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone];
}
网友评论