Latest 0.0.2
Homepage https://github.com/hkm5558/KMAlertView
License MIT
Platforms ios 8.0
Authors

一款自定义的AlertView

What’s it look like?

NoneBlur

LightBlur

DarkBlur

Animate

Installation with CocoaPods

CocoaPods 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:

$ 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:

$ pod install

Requirements

This library requires iOS 8.0+

Usage


    ///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, [email protected]

License

KMAlertView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "KMAlertView",
    "version": "0.0.2",
    "summary": "u4e00u6b3eu81eau5b9au4e49u7684AlertView u9644u5e26u52a8u753bu6548u679c",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/hkm5558/KMAlertView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "hkm5558": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hkm5558/KMAlertView.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "KMAlertView/Classes/*",
    "public_header_files": "KMAlertView/Classes/*.h",
    "subspecs": [
        {
            "name": "KMAlertStyle",
            "source_files": "KMAlertView/Classes/KMAlertStyle/*.{h,m}",
            "public_header_files": "KMAlertView/Classes/KMAlertStyle/*.h"
        }
    ]
}

Pin It on Pinterest

Share This