All Projects → agordeev → OverlayViewController

agordeev / OverlayViewController

Licence: MIT license
A simple way to present your child view controller on top of another one

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to OverlayViewController

rconsharp
rconsharp is a Valve RCON protocol implementation written in C# targeting netstandard 2.1
Stars: ✭ 43 (+152.94%)
Mutual labels:  protocol
drf tweaks
Extensions for Django Rest Framework
Stars: ✭ 77 (+352.94%)
Mutual labels:  extensions
opensimmpls
OpenSimMPLS is an MPLS network simulator, multiplatform and mutilanguage. It is easy-to-use and is intended for teaching activities. It can be used as well to test new protocols, techniques and methods related to MPLS and/or GoS.
Stars: ✭ 21 (+23.53%)
Mutual labels:  protocol
nat-api
↔️ Fast port mapping with UPnP and NAT-PMP
Stars: ✭ 22 (+29.41%)
Mutual labels:  protocol
trinity-eth
No description or website provided.
Stars: ✭ 14 (-17.65%)
Mutual labels:  protocol
protocol
Covee protocol for decentralized teamwork
Stars: ✭ 18 (+5.88%)
Mutual labels:  protocol
wayland-explorer
Easily browse and read Wayland protocols documentation
Stars: ✭ 78 (+358.82%)
Mutual labels:  protocol
live-stream-media-source-extensions
Live stream h264 encoded mp4 video on media source extensions using ffmpeg, node.js, socket.io, and express. Works in chrome, firefox, safari, and android. Not iOS compatible. Work has moved to mse-live-player repo =>
Stars: ✭ 24 (+41.18%)
Mutual labels:  extensions
GEO-network-client
Reference implementation of the GEO Protocol.
Stars: ✭ 19 (+11.76%)
Mutual labels:  protocol
redis-protocol-example
用 Go 来了解一下 Redis 通讯协议
Stars: ✭ 39 (+129.41%)
Mutual labels:  protocol
flutter scale aware
🎗 Scale-based layouts with a bit more ease, powered by extensions.
Stars: ✭ 26 (+52.94%)
Mutual labels:  extensions
kleros
Kleros smart contracts
Stars: ✭ 203 (+1094.12%)
Mutual labels:  protocol
ByteBuffer
nodejs版本的ByteBuffer和C++通信的利器!
Stars: ✭ 70 (+311.76%)
Mutual labels:  protocol
memcacher
C++ implementation of Memcache Binary Protocol.
Stars: ✭ 16 (-5.88%)
Mutual labels:  protocol
grass-addons
GRASS GIS Addons Repository (Manuals: https://grass.osgeo.org/grass-stable/manuals/addons/ | Linux-logs: https://grass.osgeo.org/addons/grass8/logs/ | Windows logs: https://wingrass.fsv.cvut.cz/grass82/addons/grass-8.2.0/logs/)
Stars: ✭ 64 (+276.47%)
Mutual labels:  extensions
MqttAndroidExample
An example Android app using MQTT protocol
Stars: ✭ 19 (+11.76%)
Mutual labels:  protocol
ws-promise
A tiny, Promise-based WebSocket protocol allowing request-response usage in ECMAScript
Stars: ✭ 20 (+17.65%)
Mutual labels:  protocol
enzyme-subgraph
The official subgraph the Enzyme protocol.
Stars: ✭ 20 (+17.65%)
Mutual labels:  protocol
node-ads
NodeJS Twincat ADS protocol implementation
Stars: ✭ 49 (+188.24%)
Mutual labels:  protocol
memcache
Node.js memcached client with the most efficient ASCII protocol parser
Stars: ✭ 26 (+52.94%)
Mutual labels:  protocol

OverlayViewController

A simple way to present your child view controller on top of another one. Read relevant article: https://andreygordeev.com/2017/04/18/overlay-view-controller-protocols-swift/.

Written on Swift.

Usage

Parent view controller

Make the parent view controller conforming to OverlayHost protocol and call showOverlay(_:) method when needed:

class ViewController: UIViewController, OverlayHost {
    @IBAction func showOverlayButtonPressed() {
        showOverlay(type: MessageViewController.self, fromStoryboardWithName: "Main")
    }
}

Overlay view controller

Make the parent view controller conforming to OverlayViewController protocol and call dismissOverlay() method when you want to dismiss the overlay:

class MessageViewController: UIViewController, OverlayViewController {
    let overlaySize: CGSize? = CGSize(width: UIScreen.main.bounds.width * 0.8, height: 120.0)
    @IBAction func closeButtonPressed() {
        dismissOverlay()
    }
}

On storyboard, set view controller's Storyboard ID to MessageViewController.

Installation

Just drop OverlayViewController.swift into your project and you're all set.

Author

Andrey Gordeev

License

This project is under MIT license. For more information, see LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].