Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egzonarifi/eaalertview
iOS 11 Style Alerts
https://github.com/egzonarifi/eaalertview
alert datepicker picker swift4
Last synced: 3 months ago
JSON representation
iOS 11 Style Alerts
- Host: GitHub
- URL: https://github.com/egzonarifi/eaalertview
- Owner: EgzonArifi
- License: mit
- Created: 2018-08-10T16:51:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T14:25:10.000Z (over 3 years ago)
- Last Synced: 2024-03-15T13:42:33.448Z (10 months ago)
- Topics: alert, datepicker, picker, swift4
- Language: Swift
- Size: 579 KB
- Stars: 17
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EAAlertView
iOS Modern Style Alerts
# Alerts & Pickers
Alerts with TextField, TextView, DatePicker, PickerView
## Usage
- New Alert
```swift
let alert = EAAlertView(appearance: appearance)
// or
let alert = EAAlertView()
```- Set and styling message
```swift
let appearance = EAAlertView.EAAppearance(
kTextFieldHeight: 60,
kButtonHeight: 60,
showCloseButton: false,
shouldAutoDismiss: false
)
```
- Add button with image```swift
alert.addAction(image: image, title: "Title", color: .black, style: .default) { action in
// completion handler
}
```* Show Alert
```swift
// show alert
_ = alert.show("Title", subTitle: "subtitle")
```## Date picker
```swift
let picker = UIDatePicker(frame: CGRect(x: 0, y: 0, width: self.view.frame.width*0.8, height: 200))
picker.datePickerMode = UIDatePickerMode.datelet appearance = EAAlertView.EAAppearance(kButtonHeight: 60, showCloseButton: false, shouldAutoDismiss: false)
let alert = EAAlertView(appearance: appearance)
alert.customSubview = picker_ = alert.addButton(backgroundImage: image), "Select") {
alert.hideView()
}
_ = alert.show("Birthdate", subTitle: " ")
```## Text View
```swift
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.hideView()
}
_ = alert.show("Terms", subTitle: "")
```## Installing
#### Cocoapods
`pod 'EAAlertView'`
## Requirements
* Swift 4
* iOS 11 or higher## Authors
* **Egzon Arifi** - [egzonarifi](https://github.com/egzonarifi)
## 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.