Sets the styled title to use for the specified state.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The styled text string so use for the title.
The state that uses the specified title. The possible values are described in
Use this method to set the title of the button, including any relevant formatting information. If you set both a title and an attributed title for the button, the button prefers the use of the attributed title.
At a minimum, you should set the value for the normal state. If a title is not specified for a state, the default behavior is to use the title associated with the
UIControl state. If the value for
UIControl is not set, then the property defaults to a system value.