KHAlertController 1.0.0

KHAlertController 1.0.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
Released上次发布Aug 2017

[sherlock] 维护。



  • HeiKki

image

可设置的属性

//控制内容视图垂直偏移
//    alter.offsetY = 100;
//选择按钮的高度
//    alter.buttonHeight = 100;
//圆角
//    alter.margin = 100;

使用方法

HKAlertController *alter = [HKAlertController alertControtViewWithTitle:@"确认取消课程吗?" message:@"点击\"确认\"您将取消本次课程" image:[UIImage imageNamed:@"img1"]  preferredStyle:HKAlertControllerStyle_imageAlert_sheet];

HKAlertAction *alert_0 = [HKAlertAction actionWithTitle:@"确认" style:HKAlertActionStyleDefault handler:^(HKAlertAction * _Nullable action) {
NSLog(@"%@",action.title);
}];
HKAlertAction *alert_1 = [HKAlertAction actionWithTitle:@"取消" style:HKAlertActionStyleCancel handler:^(HKAlertAction * _Nullable action) {
NSLog(@"%@",action.title);
}];
HKAlertAction *alert_2 = [HKAlertAction actionWithTitle:@"销毁" style:HKAlertActionStyleDestructive handler:^(HKAlertAction * _Nullable action) {
NSLog(@"%@",action.title);
}];

[alter addAction:alert_0];
[alter addAction:alert_1];
[alter addAction:alert_2];
//控制垂直内容视图偏移
//    alter.offsetY = 100;
//选择按钮的高度
//    alter.buttonHeight = 100;
//圆角
//    alter.margin = 100;
[self presentViewController:alter animated:NO completion:nil];

个人 demo 集合 https://github.com/SherlockQi/HKNote