繁体   English   中英

如何在iOS uitableview deleteRowsAtIndexPaths上增加动画过渡秒数

[英]How to increase animation transition seconds on ios uitableview deleteRowsAtIndexPaths

当从uitableview删除一行时,我们如何更改动画过渡速度,我检查了文档,但没有找到可以为过渡速度指定秒数的参数。

[self.tableViewMeeting deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationLeft];

让我知道是否有任何解决方法。

您为什么不尝试UIView动画。

[UIView animateWithDuration:2 
                      delay:0.2 
                    options:UIViewAnimationOptionCurveEaseInEaseOut 
                 animations:^{
                     [self.tableView beginUpdates];
                     [self.tableView endUpdates];  
                 } 
                 completion:^(BOOL finished) {
                     // code
                 }
];
[CATransaction begin];
[tableView beginUpdates];
//...
[CATransaction setCompletionBlock: ^{
    // Code to be executed upon completion
}];
[tableView insertRowsAtIndexPaths: indexPaths
                 withRowAnimation: UITableViewRowAnimationAutomatic];
[tableView endUpdates];
[CATransaction commit];

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM