SDKs
- iOS 6.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Frameworks
- UIKit
- App
Kit
Declaration
const NSAttributed String Key NSBackgroundColorAttributeName;
NSAttributed String Key NSBackgroundColorAttributeName;
Discussion
The value of this attribute is a UIColor
object. Use this attribute to specify the color of the background area behind the text. If you do not specify this attribute, no background color is drawn.