Skip to content
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

Open
davidbritch opened this issue May 2, 2024 · 2 comments
Open

iOS button behaviour #2223

davidbritch opened this issue May 2, 2024 · 2 comments
Labels
doc-enhancement Improve the current content [org] Pri3

Comments

@davidbritch
Copy link
Contributor

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)

@davidbritch davidbritch added the doc-enhancement Improve the current content [org] label May 2, 2024
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label May 2, 2024
@PureWeen
Copy link
Member

PureWeen commented May 9, 2024

@davidbritch we rolled this change back and it won't roll out until SR6 FYI
dotnet/maui#22306

@davidbritch davidbritch self-assigned this Jul 18, 2024
@davidbritch davidbritch added 🗺️ reQUEST Triggers an issue to be imported into Quest. and removed Pri3 labels Jul 18, 2024
@davidbritch davidbritch moved this from 🔖 Ready to 🏗 In progress in dotnet/docs-maui 2024 Sprints Jul 19, 2024
@davidbritch davidbritch removed the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Jul 19, 2024
@davidbritch
Copy link
Contributor Author

This still hasn't been merged yet. See dotnet/maui#22476

@davidbritch davidbritch removed their assignment Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org] Pri3
Projects
None yet
Development

No branches or pull requests

3 participants