To run the example project, clone the repo, and run pod install
from the Example directory first.
Swift 3, iOS 8+
AnyControllerDialog is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "AnyControllerDialog", :git => 'https://github.com/npu3pak/ios-lib-any-controller-dialog.git'
- Import library
import AnyControllerDialog
- Instantiate view controller that you want to display as dialog:
let dialogContentController = storyboard?.instantiateViewController(withIdentifier: "DialogContent")
- Call showDialog() method of your source view controller:
showDialog(dialogContentController!, height: 200, width: 200, top: 70, completion: {print("Presented!")})
This is extension method added by this library. You can call it from view controllers of any type.
- Dismiss controller properly:
dismissDialog(dialogContentController, completion: {print("Dismissed!")})
Евгений Сафронов, evsafronov.personal@yandex.ru
AnyControllerDialog is available under the MIT license. See the LICENSE file for more info.