屏幕过渡动画器,将过渡屏幕分解成一组矩形,这些矩形逐渐淡出,从而显示新控制器。
要运行示例项目,先克隆仓库,然后从 Example 目录运行 pod install
。
let animator = RectangleDissolveAnimator()
viewController.transitioningDelegate = animator
还有一些可以调整的参数
animator.rectanglesVertical = 14 // this determines the height of the rectangle based on screen height
animator.rectanglesHorizontal = 8 // width of the rectangle based on screen width
animator.batchSize = 20 // the amount of rectangles which start fading at the same time
animator.fadeAnimationDuration = 0.3 // fade animation duration
animator.tempo = 1000 // the frequency of each batch start fading
RectangleDissolve 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中
pod "RectangleDissolve"
Михаил Рахманов, [email protected]
RectangleDissolve 可在 MIT 许可证下获得。有关更多信息,请参阅 LICENSE 文件。