SwiftyPresentation 1.0.9

SwiftyPresentation 1.0.9

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布上次发布2017年10月
SwiftSwift版本4.0
SPM支持SPM

Nicolas Renaud维护。



  • Nicolas Renaud




像警报和幻灯片一样呈现模态控制器。

需求

  • iOS 9.0+
  • Swift 4

使用方法

简单导入SwiftyPresentation。

import SwiftyPresentation

创建您想要使用的演示文稿管理器。

var alertPresentationManager = AlertPresentationManager()

配置管理器和你想要的目标控制器。

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if let controller = segue.destination as? MyAlertViewController {
        alertPresentationManager.presentationDirection = .bottom
        alertPresentationManager.dismissDirection = .bottom
        controller.modalPresentationStyle = .custom
        controller.transitioningDelegate = alertPresentationManager
    }
}

许可证

此代码在MIT许可证的条款和条件下分发。