⚙️ Configuration for UIViewController presentation.
Clone or download
Latest commit 98c0fda Mar 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets README Jan 23, 2018
PresentationSettings 1.2.0 Mar 7, 2018
Sample 1.2.0 Mar 7, 2018
.gitignore 1.0.0 Jan 22, 2018
LICENSE.md 1.0.0 Jan 22, 2018
Package.swift 1.0.0 Jan 22, 2018
PresentationSettings.podspec 1.2.0 Mar 7, 2018
README.md 1.2.0 Mar 7, 2018
_config.yml Set theme jekyll-theme-leap-day Jan 25, 2018

README.md


Version Author Build Passing Swift
Platforms MIT
Cocoapods Carthage SPM

Introduction

What's this?

Configuration for UIViewController presentation.

Preview

Requirements

  • iOS 8.0+
  • Xcode 9 with Swift 4

Installation

CocoaPods

pod 'PresentationSettings'

Contribution

You are welcome to fork and submit pull requests.

License

PresentationSettings is open-sourced software, licensed under the MIT license.

Usage

The simplest way:

@IBAction func showAlert(_ sender: UIButton) {
    let alert = SomeController.init()
    self.present(viewController: alert, settings: .default, animated: true, completion: nil)
}

Create your custom presentation settings:

let type = PresentationType.dynamic(center: .center)
let settings = PresentationSettings.init(presentationType: type)
settings.transitionType = nil
settings.dismissTransitionType = nil
settings.dismissAnimated = true
settings.dismissOnSwipe = false
settings.dismissOnTap = false
settings.keyboardTranslationType = .moveUp
....