An open API service indexing awesome lists of open source software.

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 附带动画效果

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.