Skip to content

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

License

Notifications You must be signed in to change notification settings

daveneff/CustomAlertPresentationController

Repository files navigation

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