Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snail-z/overlaycontroller
OverlayController easily pop your custom view and provide optional transition animation. written in swift 5.0
https://github.com/snail-z/overlaycontroller
actionsheet alert cocoapods drag elastic mask overlay popup-window share sidebar sina swift
Last synced: 8 days ago
JSON representation
OverlayController easily pop your custom view and provide optional transition animation. written in swift 5.0
- Host: GitHub
- URL: https://github.com/snail-z/overlaycontroller
- Owner: snail-z
- License: mit
- Created: 2017-02-27T02:33:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T08:16:21.000Z (about 4 years ago)
- Last Synced: 2024-09-26T08:33:47.065Z (about 2 months ago)
- Topics: actionsheet, alert, cocoapods, drag, elastic, mask, overlay, popup-window, share, sidebar, sina, swift
- Language: Swift
- Homepage:
- Size: 6.11 MB
- Stars: 125
- Watchers: 8
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
![enter image description here](https://img.shields.io/badge/pod-v1.0.1-brightgreen.svg)
![enter image description here](https://img.shields.io/badge/platform-iOS%2010.0%2B-ff69b5152950834.svg)OverlayController can easily pop up any custom view. It supports layout positions, optional pop-up animations and user interaction gestures and more. If you need the Objective-C version, please see [here](https://github.com/snail-z/zhPopupController)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
* Swift 5.0
* iOS 10 or higher## Installation
OverlayController is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'OverlayController', '~> 1.0.1'
```## Usage
```swift
let ovc = OverlayController(view: self.publishView)
ovc.layoutPosition = .center
ovc.presentationStyle = .fade
ovc.willPresentClosure = { [unowned self] (sender) in
self.publishView.presentAnimate()
}
ovc.willDismissClosure = { [unowned self] (sender) in
self.publishView.dismissAnimate()
}
```Support following keyboard popup and hide
Set overlay view priority. default is OverlayLevel.normal by `windowLevel`
## Author
snail-z, [email protected]
## License
OverlayController is available under the MIT license. See the LICENSE file for more info.