ios - 调整我的警报消息的大小并设置字体颜色

标签 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)
}

最佳答案

看看here 。 基本上,您必须创建一个自定义 UIAlertView,您可以在其中自定义警报中的任何内容。我不知道如何使用基本的 UIAlertController 类来做到这一点。

关于ios - 调整我的警报消息的大小并设置字体颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35802301/

相关文章:

ios - 在哪里可以找到 iOS 用户体验导航最佳实践?

iphone - 相机应用程序支持方向吗?

swift - “ fatal error :在展开可选值时意外发现nil”是什么意思?

string - 有没有办法在 swift 中从 utf16 数组创建字符串?

azure - 需要查询平均cpu是否超过阈值

ios - 如何在viewForHeaderInSection中设置变量,然后在cellForRowAtIndexPath中使用它?

iphone - 由于辅助功能设置未检测到 iOS 手势

xcode - 确定在 Swift 中创建对称 key 异常的原因

jQuery - 按钮不会做任何事情?

javascript - 在 JavaScript 中打印两个整数的更聪明的方法