Skip to content

akinogunc/xModalController

Repository files navigation

xModalController

Swift Version Version License Platform

Installation

xModalController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'xModalController'

How to use

First import the module

import xModalController

You can show your modal like this

//initialize your view controller
let modalVc = MyViewController()

//set a frame for it
let modalFrame = CGRect(x: 20, y: 300, width: self.view.bounds.width - 40, height: 300)

//initialize the xModalController
let modalController = xModalController(parentViewController: self, modalViewController: modalVc, modalFrame: modalFrame)

//show your view controller
modalController.showModal()

Author

akinogunc, akinogunc@gmail.com

License

xModalController is available under the MIT license. See the LICENSE file for more info.