📜  swift 5 更改警报的消息颜色 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.279000             🧑  作者: Mango

代码示例1
Swift 5:
messageKey = "attributedMessage"
titleKey = "attributetTitle"
alert.setValue( NSAttributedString(
  string: "Your alert message text",
  attributes: [
    .foregroundColor : .red
  ]
), forKey: messageKey )