Latest 1.0.0
Homepage https://github.com/SherlockQi/KHAlertController
License MIT
Platforms ios 6.0, requires ARC
Authors

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

Latest podspec

{
    "name": "KHAlertController",
    "version": "1.0.0",
    "summary": "a component of photo browser on iOS",
    "homepage": "https://github.com/SherlockQi/KHAlertController",
    "description": "It is a component for ios photo browser,written by Objective-C.",
    "license": "MIT",
    "authors": {
        "HeiKki": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/SherlockQi/KHAlertController.git",
        "tag": "1.0.0"
    },
    "source_files": "KHAlertController/HKAlertController/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This