ZQPopupController 1.0.0

ZQPopupController 1.0.0

zzqlplq 维护。



  • zzqlplq

ZQPopupController

view或viewController,只要遵循PopupProtocol代理,调用指定方法就可以弹出。弹出动画支持自定义

使用方法

  1. 要弹出的ViewController需要遵循 PopupProtocol 代理
class TestViewController: UIViewController, PopupProtocol 
  1. 在需要弹出的地方调用show方法
let testVC = TestViewController()
PopupController.show(testVC)
  1. 需要移除的时候调用dismiss方法
PopupController.dismiss(self)
  1. 自定义动画遵循 PopupAnimatorProtocal代理
class Animation: PopupAnimatorProtocal  {
    
    var showAnimation: UIViewControllerAnimatedTransitioning? { 
        retrun xxx
        }
    
    var dismissAnimation: UIViewControllerAnimatedTransitioning? { 
        return xxx
        }
}

let animation = Animation()
PopupController.show(testVC, animation:animation)

  1. 其他参数配置见Demo

其他

支持使用 Swift Package Manager 导入

待办事项

  • 添加cocoapods支持
  • 在默认动画中添加渐变支持
  • 在当前目录中添加Demo