Latest 1.0.0
Homepage https://github.com/jiangboLee/LEEAlertView
License MIT
Platforms ios 8.0
Authors

Installation

From CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like SVProgressHUD in your projects. First, add the following line to your Podfile:

pod 'LEEAlertView'

Second, install LEEAlertView into your project:

pod install  

Manually

   Drag the LEEAlertView/LEEAlertView/LEEAlertView folder into your project.

Swift

Even though LEEAlertView is written in Objective-C, it can be used in Swift with no hassle. If you use CocoaPods add the following line to your Podfile:

use_frameworks!    

If you added LEEAlertView manually, just add a bridging header file to your project with the LEEAlertView header included.

Usage

(see sample Xcode project)
 

simpleType

[LEEAlertViewController showWithTitle:@"警告" message:@"helloWoeld"];
[LEEAlertViewController showWithTitle:@"提示" message:@"你好啊" alertType:UIAlertControllerStyleActionSheet actionTitles:@[@"你", @"我"] handles:@[^(UIAlertAction *action){

        NSLog(@"你");
    }, ^(UIAlertAction *action){

        NSLog(@"我");
    }]];
[LEEAlertViewController setCancleActionStyle:0];
    [LEEAlertViewController setDestructiveActionStyle:1];
    [LEEAlertViewController showWithTitle:@"提示" message:@"你好啊" alertType:UIAlertControllerStyleActionSheet actionTitles:@[@"取消", @"警告"] handles:@[^(UIAlertAction *action){

        NSLog(@"取消");
    }, ^(UIAlertAction *action){

        NSLog(@"警告");
    }]];
[LEEAlertViewController showTextFieldWithTitle:@"提示" message:@"你好啊" actionTitles:@[@"取消"] handles:@[^(UIAlertAction *action){

        NSLog(@"输入的用户名%@",self.textField.text);
    }] textFieldHandles:@[^(UITextField * _Nonnull textField){

        textField.placeholder = @"登录";
        self.textField = textField;
    },^(UITextField * _Nonnull textField){

        textField.placeholder = @"密码";
    }]];

License

LEEAlertView is distributed under the terms and conditions of the MIT license. The success, error and info icons are made by Freepik from Flaticon and are licensed under Creative Commons BY 3.0.

contact me

if has some problem,send me msg: [email protected], thanks~

Latest podspec

{
    "name": "LEEAlertView",
    "version": "1.0.0",
    "summary": "UIAlertView is used more easy!",
    "homepage": "https://github.com/jiangboLee/LEEAlertView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u674eu6c5fu6ce2": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/jiangboLee/LEEAlertView.git",
        "tag": "1.0.0"
    },
    "source_files": "LEEAlertView/LEEAlertView/LEEAlertView/*.{h,m}",
    "exclude_files": "Classes/Exclude"
}

Pin It on Pinterest

Share This