各种视图效果 1.2.1

各种视图效果 1.2.1

Artur Rymarz 维护。



  • 作者:
  • [Artur Rymarz]

各种视图特效

Platform License Build Status

为 iOS 编写的各种视图特效,使用 Swift 语言编写。允许您使用简单的扩展轻松地以动画方式美化视图。支持以下动画:

  • 玻璃破裂

Example

  • 爆炸

Example

  • 雪花

Example

要求

  • iOS 9.0+
  • Xcode 9.2+
  • Swift 4.1+

使用 CocoaPods 安装

use_frameworks!

pod 'VariousViewsEffects'

使用方法

view.explode()

view.breakGlass()

view.addSnowflakes(amount: 10, speed: .slow)

您还可以自定义视图在动画完成后破碎成的碎片数,以及您调用的 view 是否在动画结束后从界面中移除。您还可以定义一个将在动画完成后调用的完成块。

view.explode(size: GridSize(columns: 15, rows: 21), removeAfterCompletion: true, completion: {
    print("animation finished")
})

尽情享受吧!:)

告诉我!

如果您发现任何问题或希望添加任何功能,请创建一个 GitHub 上的 issue。

许可证

The MIT License (MIT)

Copyright © 2017 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.