Sets the title to use for the specified state.
- iOS 2.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The title to use for the specified state.
The state that uses the specified title. The possible values are described in
Use this method to set the title for the button. The title you specify derives its formatting from the button’s associated label object. If you set both a title and an attributed title for the button, the button prefers the use of the attributed title over this one.
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
normal state. If the value for
normal is not set, then the property defaults to a system value.