Skip to content

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

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages