Skip to content
A UIPresentationController which mimics iOS' native alert presentation, display, and dismissal. Written in Swift 4.
Swift
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CustomAlertAnimations.swift
CustomAlertPresentationController.swift
CustomAlertTransitioningManager.swift
LICENSE.md
README.md

README.md

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)
	}

}
You can’t perform that action at this time.