Tag: SWIFT uialertcontroller

更改UIAlertcontroller背景颜色

好,所以我有这个警报,我正在使用,我想它的背景是黑色的,而不是灰色的。 我设法改变标题和消息的文本的颜色,但不是背景颜色。 那么我想要的颜色。 我已经把它改成绿色的蓝色和白色,但不是黑色的。 当我尝试将其改为黑色时,它变成灰色。 任何build议将有助于和赞赏。 我在这里试过如何更改UIAlertController的背景颜色? 这就是我现在所处的位置。 这是我现在要做的: func showAlert(title:String, message:String) { //Set up for the title color let attributedString = NSAttributedString(string: title, attributes: [ NSFontAttributeName : UIFont.systemFontOfSize(15), //your font here, NSForegroundColorAttributeName : UIColor.whiteColor() ]) //Set up for the Message Color let attributedString2 = NSAttributedString(string: message, attributes: [ NSFontAttributeName : UIFont.systemFontOfSize(15), //your font here, […]