Latest 0.1.6
Homepage https://github.com/EgzonArifi/EAAlertView
License MIT
Platforms ios 10.0
Authors

iOS 11 Style Alerts

Swift 4.0Platform: iOSXCode 9+iOS 11Licence MIT

Alerts & Pickers

Alerts with TextField, TextView, DatePicker, PickerView

Usage

  • New Alert
let alert = EAAlertView(appearance: appearance)
// or
let alert = EAAlertView()
  • Set and styling message
let appearance = EAAlertView.EAAppearance(
kTextFieldHeight: 60,
kButtonHeight: 60,
showCloseButton: false,
shouldAutoDismiss: false
)
  • Add button with image
alert.addAction(image: image, title: "Title", color: .black, style: .default) { action in
// completion handler
}
  • Show Alert
// show alert
_ = alert.show("Title", subTitle: "subtitle")

Date picker

let picker = UIDatePicker(frame: CGRect(x: 0, y: 0, width: self.view.frame.width*0.8, height: 200))
picker.datePickerMode = UIDatePickerMode.date

let appearance = EAAlertView.EAAppearance(kButtonHeight: 60, showCloseButton: false, shouldAutoDismiss: false)
let alert = EAAlertView(appearance: appearance)
alert.customSubview = picker

_ = alert.addButton(backgroundImage: image), "Select") {
   alert.dismiss(animated: true, completion: .none)
}
_ = alert.show("Birthdate", subTitle: " ")

Text View

let appearance = EAAlertView.EAAppearance(kTextViewdHeight: self.view.frame.height*0.6, kButtonHeight: 60, showCloseButton: false, shouldAutoDismiss: false)
let alert = EAAlertView(appearance: appearance)

let textView = alert.addTextView()
textView.text = "text"

_ = alert.addButton(backgroundImage: image, "Accept") {
alert.dismiss(animated: true, completion: .none)
}
_ = alert.show("Terms", subTitle: "")

Installing

Cocoapods

pod 'EAAlertView'

Requirements

  • Swift 4
  • iOS 11 or higher

Authors

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

License

This project is licensed under the MIT License.

Latest podspec

{
    "name": "EAAlertView",
    "version": "0.1.6",
    "summary": "iOS 11 style alerts",
    "homepage": "https://github.com/EgzonArifi/EAAlertView",
    "license": "MIT",
    "authors": {
        "Egzon Arifi": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/EgzonArifi/EAAlertView.git",
        "tag": "0.1.6"
    },
    "swift_version": "4.0",
    "source_files": "EAAlertView/*.{swift,h}"
}

Pin It on Pinterest

Share This