Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This repository was archived by the owner on May 28, 2025. It is now read-only.

BREAKING CHANGE: UIButton now uses XAML behind the scenes #1331

@ArnOmsft

Description

@ArnOmsft

With this month’s release comes a change to UIButton: we have replaced the previous custom implementation of UIButton with one that uses XAML controls behind the scenes. This change might not be fully transparent for any app that’s using the current implementation since the new implementation does not currently support some properties that were previously supported.
Here is a summary of what comes with this new implementation compared to what’s available today*:

Feature Current Implementation New Implementation
adjustsImageWhenDisabled No No
adjustsImageWhenHighlighted No No
- attributedTitle:forState No No
- backgroundImageForState: Yes Yes
- backgroundRectForBounds: No No
buttonType Yes No
+ buttonWithType: Yes Caveat
contentEdgeInsets Yes Yes
- contentRectForBounds: Yes Yes
currentAttributedTitle No No
currentBackgroundImage Yes Yes
currentImage Yes Yes
currentTitle Yes Yes
currentTitleColor Yes Yes
currentTitleShadowColor No No
font Yes Yes
imageEdgeInsets Yes Yes
- imageForState: Yes Yes
- imageRectForContentRect: Yes Yes
imageView Yes Caveat
lineBreakMode No No
reversesTitleShadowWhenHighlighted No No
- setAttributedTitle:forState No No
- setBackgroundImage:forState Yes Yes
- setImage:forState: Yes Yes
- setTitle:forState: Yes Yes
- setTitleColor:forState: Yes Yes
- setTitleShadowColor:forState: No No
showsTouchWhenHighlighted No No
tintColor No No
- titleColorForState: Yes Yes
titleEdgeInsets Yes Yes
- titleForState: Yes Yes
titleLabel Yes Caveat
- titleRectForContentRect: Yes Yes
- titleShadowColorForState: No No
titleShadowOffset No No
touchesBegan:withEvent: Yes Yes
touchesCancelled:withEvent: Yes Yes
touchesEnded:withEvent: Yes Yes
touchesMoved:withEvent: Yes Yes
* For the one marked as caveat, you can find details about what's not supported in the code itself

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions