UIButton$Methods extension
- on
Properties
- adjustsImageWhenDisabled ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
adjustsImageWhenDisabledgetter/setter pair - adjustsImageWhenHighlighted ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
adjustsImageWhenHighlightedgetter/setter pair - automaticallyUpdatesConfiguration ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
When YES, the button will automatically call -updatedConfigurationForButton: on itsconfigurationwhen the button's state changes, and apply the updated configuration to the button. The default value is YES.getter/setter pair -
Available on UIButton, provided by the UIButton$Methods extension
buttonTypeno setter - changesSelectionAsPrimaryAction ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
Indicates if the button changes selection as its primary action. This shows the menu as options for selection if a menu is populated and showsMenuAsPrimaryAction is enabled. If no menu is provided or it is not the primary action, UIControlStateSelected is toggled on and off for the primary action.getter/setter pair - configuration ↔ UIButtonConfiguration?
-
Available on UIButton, provided by the UIButton$Methods extension
Setting a non-nil value forconfigurationwill opt into configuration-based behavior on UIButton, update the button in a platform specific manner, and enable/disable some API.getter/setter pair -
configurationUpdateHandler
↔ ObjCBlock<
Void Function(UIButton)> ? -
Available on UIButton, provided by the UIButton$Methods extension
Block-based equivalent to overriding -updateConfiguration in a subclass. Setting this handler will force the button into configuration-based behavior (see theconfigurationproperty). This block is called after-updateConfigurationgetter/setter pair - contentEdgeInsets ↔ UIEdgeInsets
-
Available on UIButton, provided by the UIButton$Methods extension
contentEdgeInsetsgetter/setter pair - currentAttributedTitle → NSAttributedString?
-
Available on UIButton, provided by the UIButton$Methods extension
currentAttributedTitleno setter - currentBackgroundImage → UIImage?
-
Available on UIButton, provided by the UIButton$Methods extension
currentBackgroundImageno setter - currentImage → UIImage?
-
Available on UIButton, provided by the UIButton$Methods extension
currentImageno setter - currentPreferredSymbolConfiguration → UIImageSymbolConfiguration?
-
Available on UIButton, provided by the UIButton$Methods extension
currentPreferredSymbolConfigurationno setter - currentTitle → NSString?
-
Available on UIButton, provided by the UIButton$Methods extension
currentTitleno setter - currentTitleColor → UIColor
-
Available on UIButton, provided by the UIButton$Methods extension
currentTitleColorno setter - currentTitleShadowColor → UIColor?
-
Available on UIButton, provided by the UIButton$Methods extension
currentTitleShadowColorno setter - font ↔ UIFont
-
Available on UIButton, provided by the UIButton$Methods extension
fontgetter/setter pair - imageEdgeInsets ↔ UIEdgeInsets
-
Available on UIButton, provided by the UIButton$Methods extension
imageEdgeInsetsgetter/setter pair - imageView → UIImageView?
-
Available on UIButton, provided by the UIButton$Methods extension
imageViewno setter - isHeld → bool
-
Available on UIButton, provided by the UIButton$Methods extension
Returns true while the button is presenting a menu.no setter - isHovered → bool
-
Available on UIButton, provided by the UIButton$Methods extension
If pointer effects are enabled for the button, this will return true when an effect is active.no setter - isPointerInteractionEnabled ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
Enables this button's built-in pointer interaction.getter/setter pair - lineBreakMode ↔ NSLineBreakMode
-
Available on UIButton, provided by the UIButton$Methods extension
lineBreakModegetter/setter pair -
Available on UIButton, provided by the UIButton$Methods extension
An optional menu for the button to display. The button will automatically enable or disable its contextMenuInteraction when a non-nil or nil menu is set. Defaults to nil.getter/setter pair -
pointerStyleProvider
↔ ObjCBlock<
UIPointerStyle? Function(UIButton, UIPointerEffect, UIPointerShape)> ? -
Available on UIButton, provided by the UIButton$Methods extension
! @abstract Called when the system pointer hovers over this button if its pointer interaction is enabled. The system calls this block with a proposed UIPointerEffect and UIPointerShape. You may use them to construct a customized version of the system provided style or return an entirely custom one. Setting this property automatically enables the button's pointer interaction and sets @c pointerInteractionEnabled to true.getter/setter pair - reversesTitleShadowWhenHighlighted ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
reversesTitleShadowWhenHighlightedgetter/setter pair - role ↔ UIButtonRole
-
Available on UIButton, provided by the UIButton$Methods extension
rolegetter/setter pair - showsTouchWhenHighlighted ↔ bool
-
Available on UIButton, provided by the UIButton$Methods extension
showsTouchWhenHighlightedgetter/setter pair - subtitleLabel → UILabel?
-
Available on UIButton, provided by the UIButton$Methods extension
The label used to display the subtitle, when present.no setter - tintColor ↔ UIColor
-
Available on UIButton, provided by the UIButton$Methods extension
tintColorgetter/setter pair - titleEdgeInsets ↔ UIEdgeInsets
-
Available on UIButton, provided by the UIButton$Methods extension
titleEdgeInsetsgetter/setter pair - titleLabel → UILabel?
-
Available on UIButton, provided by the UIButton$Methods extension
titleLabelno setter - titleShadowOffset ↔ CGSize
-
Available on UIButton, provided by the UIButton$Methods extension
titleShadowOffsetgetter/setter pair
Methods
-
attributedTitleForState(
int state) → NSAttributedString? -
Available on UIButton, provided by the UIButton$Methods extension
attributedTitleForState: -
backgroundImageForState(
int state) → UIImage? -
Available on UIButton, provided by the UIButton$Methods extension
backgroundImageForState: -
backgroundRectForBounds(
CGRect bounds) → CGRect -
Available on UIButton, provided by the UIButton$Methods extension
backgroundRectForBounds: -
contentRectForBounds(
CGRect bounds) → CGRect -
Available on UIButton, provided by the UIButton$Methods extension
contentRectForBounds: -
encodeWithCoder(
NSCoder coder) → void -
Available on UIButton, provided by the UIButton$Methods extension
encodeWithCoder: -
imageForState(
int state) → UIImage? -
Available on UIButton, provided by the UIButton$Methods extension
imageForState: -
imageRectForContentRect(
CGRect contentRect) → CGRect -
Available on UIButton, provided by the UIButton$Methods extension
imageRectForContentRect: -
init(
) → UIButton -
Available on UIButton, provided by the UIButton$Methods extension
init -
initWithCoder(
NSCoder coder) → UIButton? -
Available on UIButton, provided by the UIButton$Methods extension
initWithCoder: -
initWithFrame(
CGRect frame) → UIButton -
Available on UIButton, provided by the UIButton$Methods extension
initWithFrame: -
initWithFrame$1(
CGRect frame, {UIAction? primaryAction}) → UIButton -
Available on UIButton, provided by the UIButton$Methods extension
Initializes the control and adds primaryAction for the UIControlEventPrimaryActionTriggered control event. Subclasses of UIControl may alter or add behaviors around the usage of primaryAction, see subclass documentation of this initializer for additional information. -
preferredSymbolConfigurationForImageInState(
int state) → UIImageSymbolConfiguration? -
Available on UIButton, provided by the UIButton$Methods extension
preferredSymbolConfigurationForImageInState: -
setAttributedTitle(
NSAttributedString? title, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setAttributedTitle:forState: -
setBackgroundImage(
UIImage? image, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setBackgroundImage:forState: -
setImage(
UIImage? image, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setImage:forState: -
setNeedsUpdateConfiguration(
) → void -
Available on UIButton, provided by the UIButton$Methods extension
Requests the view update its configuration for its current state. This method is called automatically when the button's state may have changed, as well as in other circumstances where an update may be required. Multiple requests may be coalesced into a single update at the appropriate time. -
setPreferredSymbolConfiguration(
UIImageSymbolConfiguration? configuration, {required int forImageInState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setPreferredSymbolConfiguration:forImageInState: -
setTitle(
NSString? title, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setTitle:forState: -
setTitleColor(
UIColor? color, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setTitleColor:forState: -
setTitleShadowColor(
UIColor? color, {required int forState}) → void -
Available on UIButton, provided by the UIButton$Methods extension
setTitleShadowColor:forState: -
titleColorForState(
int state) → UIColor? -
Available on UIButton, provided by the UIButton$Methods extension
titleColorForState: -
titleForState(
int state) → NSString? -
Available on UIButton, provided by the UIButton$Methods extension
titleForState: -
titleRectForContentRect(
CGRect contentRect) → CGRect -
Available on UIButton, provided by the UIButton$Methods extension
titleRectForContentRect: -
titleShadowColorForState(
int state) → UIColor? -
Available on UIButton, provided by the UIButton$Methods extension
titleShadowColorForState: -
updateConfiguration(
) → void -
Available on UIButton, provided by the UIButton$Methods extension
Subclasses should override this method and update the button'sconfiguration. This method should not be called directly, usesetNeedsUpdateConfigurationto request an update.