I’m having an issue with XCode 11.3 where I am unable to use the NSAttributedString.Key.foreground
attribute when creating a custom action sheet. The code I’m using is shown below, and the resulting screengrab is included above.
let attributedMessageText = NSMutableAttributedString(
string: description,
attributes: [
NSAttributedString.Key.paragraphStyle: paragraphStyle,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13.0),
NSAttributedString.Key.foregroundColor: UIColor.red
]
)
When attempting to change the background color, the color turns to gray instead. Has anyone else encountered this issue?