Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.