[iOS] Use updated APIs for the button with images#20953
[iOS] Use updated APIs for the button with images#20953tj-devel709 wants to merge 22 commits intomainfrom
Conversation
|
Bringing over this comment: It appears that there is an issue on iOS with an ImageButton inside a scrollview. The image does not resize with the width request as android and Windows does. Check out the bottom imagebutton in each of the screenshots: This is the relevant xaml: <ScrollView HeightRequest="100" WidthRequest="50">
<ImageButton Source="dotnet_bot.png" />
</ScrollView> |
Could we move |
395da71 to
c051eb7
Compare
e5aec15 to
b4d09d9
Compare
becfb16 to
e01061e
Compare
| { | ||
| [XamlCompilation(XamlCompilationOptions.Compile)] | ||
| [Issue(IssueTracker.Github, 18242, "Button ImageSource not Scaling as expected", PlatformAffected.UWP)] | ||
| [Issue(IssueTracker.Github, 18242, "Button ImageSource not Scaling as expected", PlatformAffected.All)] |
There was a problem hiding this comment.
Could we include here a sample using a different ContentLayout (for example, Top)?
Could we include a case using dynamic size?. We can include a button, and tapping it just increase at runtime the height using a random value.
|
Since this PR is not addressing resizing, removed the existing UITest for iOS that was testing resizing and instead added a UITest with a screenshot test to make sure the different image placements work with the button. Will wait for the UITest to produce the diffs! |
|
|
||
| App.WaitForElement("WaitForStubControl"); | ||
|
|
||
| VerifyScreenshot(); |
|
The windows screenshot is looking a little funky. Testing on windows |
|
Possibly related |
* Ensure images in buttons never scale up, only down * Use `GetImageSourceSize` * Port UI tests from #20953 * Ensure max height is reset Ensure source is set after image opened event is subscribed to --------- Co-authored-by: Mike Corsaro <mikecorsaro@microsoft.com>
|
Closing for now until coming back to this one! |








Description of Change
Cherry pick iOS only changes from #19834This PR updates a deprecated API in iOS to use the newer UIButton.Configuration API. Resizing is not really an option anymore with the new API and requires creating a new image each time. For now, let's update to the new API.
Issues Fixed
Makes progress towards #9734
Makes progress towards #21394