//
// UIAlertView+Additions.h
// V6
//
// Created by aidong on 15/8/12.
// Copyright (c) 2015年 aidong. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^UIAlertViewCallBackBlock)(NSInteger buttonIndex);
@interface UIAlertView (Additions)<UIAlertViewDelegate>
@property (nonatomic ,copy) UIAlertViewCallBackBlock alertViewCallBackBlock;
/**
* 简单的AlertView,只有一句简单的提示信息。
*
* @param message:提示信息
*
* 使用方法:[UIAlertView simpleAlert:@""];
*/
+ (void)simpleAlert:(NSString *)message;
/**
* 一个带多个参数的AlertView
*
* @param alertViewCallBackBlock:block(NSInteger buttonIndex)
* @param title:名称
* @param message:提示信息
*
* 使用方法:
[UIAlertView alertWithCallBackBlock:^(NSInteger buttonIndex){
// 从左依次向右
if (buttonIndex == 0) {
NSLog(@"Press 0"); // 左边第一个button(cancelButton)
}else if (buttonIndex &#
OC UIAlertView简化使用
最新推荐文章于 2020-06-02 10:03:14 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)