https://github.com/mzc0829/alerteasily
Easy to show UIAlertController, written in swift.
https://github.com/mzc0829/alerteasily
alertcontroller alerteasily carthage cocoapods ios swift4
Last synced: 3 months ago
JSON representation
Easy to show UIAlertController, written in swift.
- Host: GitHub
- URL: https://github.com/mzc0829/alerteasily
- Owner: MZC0829
- License: mit
- Created: 2017-11-17T12:36:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-15T04:54:17.000Z (over 7 years ago)
- Last Synced: 2024-02-14T19:20:29.892Z (over 1 year ago)
- Topics: alertcontroller, alerteasily, carthage, cocoapods, ios, swift4
- Language: Swift
- Homepage:
- Size: 164 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AlertEasily
##### Easy to show UIAlertController, written in Swift.---
## Cocoapods
### 1. Add the following line to your Podfile:
```
platform :ios, '8.0'target 'YourIosApps' do
use_frameworks!
pod 'AlertEasily', '~> 1.0.0'
end
```### 2. Then, run the following command:
```
$ pod install
```## Carthage
### 1、run the following command:
```
$ touch Cartfile
```### 2、Add the following line to your Cartfile:
```
github "MZC0829/AlertEasily"
```### 3、run the following command:
```
$ carthage update
```## Requirements
>
- iOS 8.0+
- swift 3+ and swift 4## Usage
### - just like
```
showAlert(title: "This is AlertEasily")
```### - or
```
showAlert(title: "AlertEasily", message: "This is AlertEasily", preferredStyle: .alert, defaultHandler: {
print("clicked default action")
}, cancelHandler: nil)
```### - or
```
showAlert(title: "AlertEasily", message: "This is AlertEasily", preferredStyle: .alert, defaultHandler: {print("clicked default action")
}) {
print("clicked cancel action")
}
```