Open janne-hmp opened 1 month ago
This may also have something to do with the fact that these controls fade in using animation functionality on opacity at the start of the game. Perhaps SkiaSharp does not realize that on iOS and does not draw itself for that reason.
Description
On iOS in .NET 9.0 and SkiaSharp 3.0 Preview 2, in game GnollHack, SKCanvasView inside a custom control (called CustomImageButton) does not invalidate its canvas and draw itself when first entering the app on the first page of the app, resulting in a transparent picture, instead of intended graphics. If I open page on the top of the starting page, or interact with the control, then suddenly it properly draws itself. (Turning the screen from landscape to portrait or vice versa, keeps the transparent button, though.) On Android, the control works just fine. Other such buttons on other pages in iOS seem to work fine, so it seems to be something related to the behavior when entering / starting the app.
Code
https://github.com/hyvanmielenpelit/GnollHack
Here's the XAML of CustomImageButton for the sake of ease:
Expected Behavior
Both on iOS and Android, SkiaSharp draws intended button graphics for CustomImageButtons instead of a transparent bitmap when entering / starting the app.
Actual Behavior
On iOS, none of the background images of CustomImageButtons on MainPage get drawn when entering the page (first page in the app). If a page is opened above the buttons or some interaction with the buttons take place, the background is suddenly drawn. On Android, the controls work fine.
Version of SkiaSharp
3.x (Alpha)
Last Known Good Version of SkiaSharp
2.80.x (Deprecated)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Android, iOS
Platform / Operating System Version
Android 14, iOS 17.3.1
Devices
Google Pixel 6a, iPad 11,7
Relevant Screenshots
Relevant Log Output
No response
Code of Conduct