Skip to content

daveneff/CustomAlertPresentationController

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

CustomAlertPresentationController

CustomAlertPresentationController is a UIPresentationController which mimics iOS' native UIAlertController presentation, modal display, and dismissal. It is written in Swift 4.

It can be used to present any UIViewController in the same style as an iOS alert.

Example Usage

final class ViewController: UIViewController {

	let transitioningManager = CustomAlertTransitioningManager()

	// ... 

	func displayCustomAlert() {
		let customAlertController = MyCustomAlertController()
	        customAlertController.transitioningDelegate = transitioningManager
        	customAlertController.modalPresentationStyle = .custom
        	present(customAlertController, animated: true)
	}

}

About

A UIPresentationController which mimics iOS' native alert presentation, display, and dismissal. Written in Swift 4.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages