Skip to content

Custom drawer transitioning animation framework for iOS

License

Notifications You must be signed in to change notification settings

spirit-jsb/Jongdari

Repository files navigation

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, sibo_jian_29903549@163.com

许可文件

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

About

Custom drawer transitioning animation framework for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages