测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最后发布 | 2016 年 9 月 |
SPM支持 SPM | ✗ |
由 Artem Sydorenko,Serhii Butenko 维护。
此组件实现了将视图控制器分解成小块的过渡动画。
请查看这个 dribbble 上的项目。
也可以在我们的博客中阅读它的实现方法 我们的博客
首先,导入 StarWars
import StarWars
然后只需实现一个 UIViewControllerTransitioningDelegate 类,该方法将返回我们的动画,并将其分配给即将销毁的视图控制器的 transitioningDelegate。
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
let destination = segue.destinationViewController
destination.transitioningDelegate = self
}
func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return StarWarsGLAnimator()
}
在 Star Wars 动画中,你还可以自定义两项内容:动画持续时间和精灵大小。让我们看看如何实现
let animator = StarWarsGLAnimator()
animator.duration = 2
animator.spriteWidth = 8
祝您玩得开心! :)
如果您在我们的项目中使用了我们的组件,我们会非常高兴。只需发送电子邮件到 [email protected]。如果您对动画有任何问题或建议,也请告知我们。
附言。我们将发布更多优秀的项目,并有一个关于如何制作 iOS 用户体验更佳的教程。请保持关注!
The MIT License (MIT)
Copyright © 2015 Yalantis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.