美文网首页iosiOS_UIKit
UIAlertController弹出框UIAlertActio

UIAlertController弹出框UIAlertActio

作者: 絮语时光杨 | 来源:发表于2018-05-14 10:21 被阅读8次

警告弹出框,
加号➕方法;
参数:
1,title标题
2,message内容
3,preferredStyle弹出框的类型(
UIAlertControllerStyleActionSheet 按钮的形式从底部弹出,UIAlertControllerStyleAlert显示在屏幕中间)

  • (instancetype)alertControllerWithTitle:(nullable NSString *)title message:(nullable NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle;

UIAlertAction
按钮处理方法
1,title按钮标题
2,style按钮类型(UIAlertActionStyleDefault = 0,
UIAlertActionStyleCancel,
UIAlertActionStyleDestructive)
3,handler点击回调block

  • (instancetype)actionWithTitle:(nullable NSString *)title style:(UIAlertActionStyle)style handler:(void (^ __nullable)(UIAlertAction *action))handler

相关文章

网友评论

    本文标题:UIAlertController弹出框UIAlertActio

    本文链接:https://www.haomeiwen.com/subject/bmdddftx.html