alert_controller 0.0.4 alert_controller: ^0.0.4 copied to clipboard
ios原生的AlertViewController的插件
0.0.4 #
- alert_controller 是一个展示iOS系统的AlertController的插件,目前只是适配了ios 使用原生的语法形式调用ios系统弹框,支持actionSheet和alert
使用方法:
var alertVc = AlertController(title: "测试弹框",message: "这是一个弹框",preferredStyle: AlertStyle.actionSheet);
var action1 = AlertAction(title: "举报",style: AlertActionStyle.destructive,handler: (action){
print(action.title);
});
alertVc.addAction(action1);
alertVc.show();