调整大小并将字体颜色设置为警报消息

时间:2016-03-04 17:25:37

标签: ios swift alert

我正在寻求一些帮助。我想调整大小(缩小)并将字体颜色(例如蓝色)设置为警报消息功能:

func WrongMessage(theMessage: String) {

    let alertController = UIAlertController(title: "Hey",  message:"theMessage", preferredStyle: UIAlertControllerStyle.Alert)
    alertController.view.tintColor = UIColor.redColor()
    alertController.addAction(UIAlertAction(title:theMessage2, style: UIAlertActionStyle.Default,handler: nil))
    self.presentViewController(alertController, animated: true, completion: nil)
}

1 个答案:

答案 0 :(得分:0)

看看here。 基本上,您必须制作自定义UIAlertView,您可以在其中自定义警报中的任何内容。我不知道如何使用基本的UIAlertController类来完成它。