我屏幕上有一个绿色按钮。
但是在显示操作表时,绿色按钮变为灰色。
当操作表被取消时,按钮变为蓝色。
显示操作表的代码:
let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let cancelAction = UIAlertAction(title: "Cancel", style: .destructive, handler: {
(alert: UIAlertAction!) -> Void in
//println("Cancelled")
})
self.present(optionMenu, animated: true, completion: nil)
问题 为什么按钮会改变其背景颜色? 它从原始绿色变为灰色,然后模糊颜色。