This repository was archived by the owner on May 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Copy link
Copy link
Closed
Labels
Description
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 |