关于UIAlertActionStyle的一些知识点

来源:互联网 发布:华为p7手机壳淘宝 编辑:程序博客网 时间:2024/05/21 17:32

    UIAlertActionStyle.default =0,  // 默认样式

    UIAlertActionStyle.cancel,       // 取消样式

    UIAlertActionStyle.destructive   // 点击按钮为红色

1.cancel风格的按钮,无论添加的顺序如何,在只有两个按钮的时候默认在左边;超过两个按钮会出现在最后。

2.网上说,cancel按钮只能添加一个,多了会崩溃

将会报错:

'UIAlertController can only have one action with a style of UIAlertActionStyleCancel'


0 0
原创粉丝点击