UIAlertActionStyle.default =0, // 默认样式
UIAlertActionStyle.cancel, // 取消样式
UIAlertActionStyle.destructive // 点击按钮为红色
1.cancel风格的按钮,无论添加的顺序如何,在只有两个按钮的时候默认在左边;超过两个按钮会出现在最后。
2.网上说,cancel按钮只能添加一个,多了会崩溃
将会报错:
'UIAlertController can only have one action with a style of UIAlertActionStyleCancel'