AnimatableReload
用几行代码对 tableview 和 collectionview 进行动画处理。
pod "AnimatableReload"
import AnimatableReload
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "up")
无需使用 tableview 和 collectionview 的 reload 方法,只需使用上述方法进行带有动画的重新加载。您还可以指定动画的方向。
使用方法
对于 tableview
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "up")
对于 collectionview
AnimatableReload.reload(collectionView: self.demoCollectionView, animationDirection: "up")
您可以从以下方向进行动画:
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "up")
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "down")
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "left")
AnimatableReload.reload(tableView: self.demoTableView, animationDirection: "right")
AnimatableReload.reload(collectionView: self.demoCollectionView, animationDirection: "up")
AnimatableReload.reload(collectionView: self.demoCollectionView, animationDirection: "down")
AnimatableReload.reload(collectionView: self.demoCollectionView, animationDirection: "left")
AnimatableReload.reload(collectionView: self.demoCollectionView, animationDirection: "right")
示例
要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install
。
要求
安装
AnimatableReload 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "AnimatableReload"
😇
作者我的邮箱,[email protected]
![]() Harshal Jadhav |
许可证
都是你的