首页 > ios 关于删除tableviewcell的动画控制

ios 关于删除tableviewcell的动画控制

[_tableViews deleteRowsAtIndexPaths:@[cell.indexPath] withRowAnimation:UITableViewRowAnimationLeft];

这是一个删除行动画 是向左边滑动后 下面一天数据再向上移动 但是能不能让它滑动到左边后 停留一段时间 再向上移动 ,控制它滑动的时间 真心求教


                  [UIView animateWithDuration:0.3 animations:^{
                     cell.contentView.center = CGPoint(-width / 2, height / 2);
                     
                     //这个方法是干嘛???
                     //把contentView中心左移-一半的距离,m
                 }
                 completion:^(BOOL finished) {
                     [self.tableView deleteRowsAtIndexPaths:xxx
                                           withRowAnimation:UITableViewRowAnimationTop];
                 }];

自己实现呗

    [UIView animateWithDuration:0.3
                     animations:^{
                         cell.contentView.center = CGPoint(-width / 2, height / 2);
                     }
                     completion:^(BOOL finished) {
                         [self.tableView deleteRowsAtIndexPaths:xxx
                                               withRowAnimation:UITableViewRowAnimationTop];
                     }];
【热门文章】
【热门文章】