https://github.com/hkm5558/kmalertview
一款自定义的AlertView 附带动画效果
https://github.com/hkm5558/kmalertview
alert alertview cocoapods kmalertview objective-c podfile
Last synced: 7 months ago
JSON representation
一款自定义的AlertView 附带动画效果
- Host: GitHub
- URL: https://github.com/hkm5558/kmalertview
- Owner: hkm5558
- License: mit
- Created: 2017-07-05T02:24:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-06T02:54:17.000Z (almost 8 years ago)
- Last Synced: 2025-05-21T19:17:18.196Z (8 months ago)
- Topics: alert, alertview, cocoapods, kmalertview, objective-c, podfile
- Language: Objective-C
- Homepage:
- Size: 13.3 MB
- Stars: 15
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KMAlertView
一款自定义的AlertView
## What’s it look like?
### NoneBlur

### LightBlur

### DarkBlur

## Animate

## Installation with CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries. You can install it with the following command:
```bash
$ gem install cocoapods
```
#### Podfile
To integrate KMAlertView into your Xcode project using CocoaPods, specify it in your `Podfile`:
In your Podfile
>`pod 'KMAlertView'`
Then, run the following command:
```bash
$ pod install
```
## Requirements
This library requires `iOS 8.0+`
## Usage
```obj-c
///Title only
[KMAlertView showAlertWithTitle:@"Title only"];
///Message only
[KMAlertView showAlertWithMessage:@"Message only"];
///Title & Message & CallBackBlock
[KMAlertView showAlertWithTitle:self.shortTitle message:self.shortMessage callBackBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
}];
///Title & Message & ButtonTitles & CallBackBlock
[KMAlertView showAlertWithTitle:@"Title" message:@"Message" buttonTitles:@[@"button1", @"button2"] callBackBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
}];
///Setting With StyleConfigBlock
[KMAlertView showAlertWithStyleConfigBlock:^KMAlertStyle *(KMAlertStyle *alertStyle) {
return [KMAlertStyle new];
} callBackBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
}];
///ButtonTitles & StyleConfigBlock
[KMAlertView showAlertWithButtonTitles:@[@"button1", @"button2"] styleConfigBlock:^KMAlertStyle *(KMAlertStyle *alertStyle) {
return [KMAlertStyle new];
} callBackBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
}];
///AlertView Dismiss
[alertView dismissWithCompletion:^{
}];
```
## Author
hkm5558, SZHuangKM@163.com
## License
KMAlertView is available under the MIT license. See the LICENSE file for more info.