Установите свойство NSAttributedString текстового поля.Вы можете добавить customTextField в SCLAlertView.Таким образом, вы сможете форматировать текст в textBox.Я думаю, что вам может не понадобиться устанавливать все атрибуты customTextField, как я делаю ниже для достижения вашей цели.
let alert = SCLAlertView(newWindow: ())
let customTextField = UITextField()
customTextField.attributedText = NSAttributedString(string: "Hello", attributes: [NSAttributedStringKey.foregroundColor : UIColor.red ])
customTextField.contentMode = .left
customTextField.textAlignment = .left
customTextField.frame.size = CGSize(width: 0.0, height: 40.0)
customTextField.borderStyle = .roundedRect
alert?.addCustomTextField(customTextField)
alert?.addTextField("Hello")
alert?.addButton("Show Name") {
print("text value: ")
print(customTextField.text)
}
alert?.showEdit("Edit View", subTitle: "This alert view shows a text box", closeButtonTitle: "Done", duration: 0.0)
![enter image description here](https://i.stack.imgur.com/3MB6n.jpg)