-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS button behaviour #2223
Labels
Comments
@davidbritch we rolled this change back and it won't roll out until SR6 FYI |
davidbritch
added
🗺️ reQUEST
Triggers an issue to be imported into Quest.
and removed
Pri3
labels
Jul 18, 2024
This still hasn't been merged yet. See dotnet/maui#22476 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update the button doc with their behaviour on iOS.
If the image is too large for the button, it will be resized to the max size that can fit into the button without regard to the text or the spacing. If the button has text or spacing, the button content will be larger than what it can hold and will spill out into the padding or even outside the button. The most correct way to deal with this is to use the right sized image for your button in your project.
The reason why we are going forward with this direction is that on iOS 15+, the Configuration APIs for UIButton do not contain a way to simply ignore/hide the title where on iOS 14 and below, we could technically move the title out of the button if it did not fit. This leaves us with different options, prioritize the title's area and give the image the rest of the space - but this leads us to scenarios where the image can be 1x1 pixel and cause other issues. We could also have some sort of cap and say the image can take up half of the space of the button, but this is not always desired as well and can lead to unexpected behavior. Other options make things less clear to the developer about what exactly is going on in the layout of the button. The current decision allows the iOS 14 and below and iOS 15 and above (using different supported APIs from Apple) to have more similar behavior and avoid further surprises for the developer.
More info: dotnet/maui#21759 (comment)
The text was updated successfully, but these errors were encountered: