Swiftpack.co - donggyushin/DGAlertView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by donggyushin.
donggyushin/DGAlertView v1.0.2
A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.
⭐️ 5
🕓 30 weeks ago
iOS
.package(url: "https://github.com/donggyushin/DGAlertView.git", from: "v1.0.2")

DGAlertView

A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

Requirements

  • iOS 12.0+
  • Swift 5.5+
  • Xcode 10.0+

Installation

SPM

File > Add Packages > https://github.com/donggyushin/DGAlertView

CocoaPod

pod 'DGAlertView', :git => 'https://github.com/donggyushin/DGAlertView'

Usage

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

GitHub

link
Stars: 5
Last commit: 28 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v1.0.2
30 weeks ago

What's Changed

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