![](/img/trans.png)
[英]Animation not working for UITableView deleteRowsAtIndexPaths:withRowAnimation:
[英]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];
尝试这个:
self.tableView.layer.speed = 0.3
文档: https : //developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CAMediaTiming_protocol/index.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.