A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.
File > Add Packages > https://github.com/donggyushin/DGAlertView
pod 'DGAlertView', :git => 'https://github.com/donggyushin/DGAlertView'
func showAlert() {
let view: UIView = {
let view = UIView()
view.backgroundColor = .white
view.translatesAutoresizingMaskIntoConstraints = false
// Make sure give view height anyway
view.heightAnchor.constraint(equalToConstant: 200).isActive = true
return view
}()
let vc = DGAlertView(view)
// Make sure animated false
present(vc, animated: false)
}
// Hide DGAlertView programmatically
let vc = DGAlertView(view)
vc.hide()
link |
Stars: 5 |
Last commit: 2 years ago |
Full Changelog: https://github.com/donggyushin/DGAlertView/compare/v1.0.1...v1.0.2
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics