Swiftpack.co - spirit-jsb/Jongdari as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by spirit-jsb.
spirit-jsb/Jongdari 1.0.0
Custom drawer transitioning animation framework for iOS
⭐️ 1
🕓 2 weeks ago
iOS
.package(url: "https://github.com/spirit-jsb/Jongdari.git", from: "1.0.0")

Jongdari (云雀)

Jongdari 是一个自定义抽屉效果转场动画框架。

基本属性及方法

AnimationConfiguration 属性

  • direction
  • animationType
  • openDuration
  • closeDuration
  • distanceMultiplier
  • maximumDraggingPercent
  • scaleFactor
  • maskOpacity

UIViewController 拓展方法

  • open(_:animationConfigurationBuilder:)
  • registerOpenDrawerGesture(_:maximumDraggingPercent:transitionHandler:)
  • pushViewControllerFromDrawer(_:animated:)
  • presentFromDrawer(_:animated:closeDrawer:completion:)

使用方法

let viewController = UIViewController()

self.vm.open(viewController) { (animationConfiguration) in
    /// update animation configuration
    
    return animationConfiguration
}

self.vm.registerOpenDrawerGesture(.edge) { (direction) in
    switch direction {
    case .left:
        /// do somethings
    case .right:
        /// do somethings
    }
}

self.vm.presentFromDrawer(viewController, animated: true, closeDrawer: true, completion: nil)

self.vm.pushViewControllerFromDrawer(viewController, animated: true)

限制条件

  • iOS 10.0+
  • Swift 5.0+

安装

Swift Package Manager

https://github.com/spirit-jsb/Jongdari.git

作者

spirit-jsb, [email protected]

许可文件

Jongdari 可在 MIT 许可下使用,更多详情请参阅许可文件。

GitHub

link
Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

version 1.0.0
2 weeks ago

publish version 1.0.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics