You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: