https://github.com/meniny/presentationsettings
⚙️ Configuration for UIViewController presentation.
https://github.com/meniny/presentationsettings
presentation transition-animation uiviewcontroller
Last synced: about 1 year ago
JSON representation
⚙️ Configuration for UIViewController presentation.
- Host: GitHub
- URL: https://github.com/meniny/presentationsettings
- Owner: Meniny
- License: mit
- Created: 2018-01-22T15:08:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T09:24:14.000Z (over 8 years ago)
- Last Synced: 2025-04-08T21:19:19.952Z (about 1 year ago)
- Topics: presentation, transition-animation, uiviewcontroller
- Language: Swift
- Homepage: https://meniny.cn/PresentationSettings/
- Size: 727 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Introduction
## What's this?
Configuration for `UIViewController` presentation.
## Preview


## Requirements
* iOS 8.0+
* Xcode 9 with Swift 4
## Installation
#### CocoaPods
```ruby
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:
```swift
@IBAction func showAlert(_ sender: UIButton) {
let alert = SomeController.init()
self.present(viewController: alert, settings: .default, animated: true, completion: nil)
}
```
Create your custom presentation settings:
```swift
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
....
```