CLSystemAlertController 项目简介
CLSystemAlertController 封装了系统提示窗口,兼容iOS8.3以下版本。使用方法:__weak __typeof(self) weakSelf = self;
[CLSystemAlertController ShowAlertToController:self
alertControllerStyle:SystemAlertStyleAlert
title:@"这是标题"
message:@"详细信息"
cancelButtonTitle:@"取消"
destructiveButtonTitle:@"重点按钮"
otherButtonTitles:@[@"第二", @"第三"]
clickedButtonBlock:^(NSUInteger index) {
weakSelf.indexField.text = [NSString stringWithFormat:@"%d", index];
}];
如果共有n个按钮,则:
cancelButton按钮的序号为 0,
destructiveButton按钮的序号为1,
otherButton按钮的序号从为 2 ~ n-1,
如果cancelButtonTitle或者destructiveButtonTitle为nil,则其他按钮的序号向前补位
[CLSystemAlertController ShowAlertToController:self
alertControllerStyle:SystemAlertStyleAlert
title:@"这是标题"
message:@"详细信息"
cancelButtonTitle:@"取消"
destructiveButtonTitle:@"重点按钮"
otherButtonTitles:@[@"第二", @"第三"]
clickedButtonBlock:^(NSUInteger index) {
weakSelf.indexField.text = [NSString stringWithFormat:@"%d", index];
}];
如果共有n个按钮,则:
cancelButton按钮的序号为 0,
destructiveButton按钮的序号为1,
otherButton按钮的序号从为 2 ~ n-1,
如果cancelButtonTitle或者destructiveButtonTitle为nil,则其他按钮的序号向前补位