Open pschubert777 opened 1 year ago
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Experiencing this too on iOS.
some news?
I solved it by creating a DataTemplateSelector, but the MAUI team should fix it.
public class IssueiOSTemplateSelector : DataTemplateSelector
{
public DataTemplate AndroidTemplate { get; set; }
public DataTemplate IoSTemplate { get; set; }
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
if (IsAndroid())
{
return AndroidTemplate;
}
return IoSTemplate;
}
private static bool IsAndroid() => DeviceInfo.Current.Platform == DevicePlatform.Android;
}
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on iOS platform with sample project. NewMauiTodo-main.zip
The following log information appears when you try to use an image in an iOS SwipeView
2023-07-25 20:04:45.324819-0400 IfpaMaui[20938:6611044] [Graphics] Invalid size provided to UIGraphicsBeginImageContext(): size={0, 0}, scale=3.000000
When is this going to be fixed?
I solved it by creating a DataTemplateSelector, but the MAUI team should fix it.
public class IssueiOSTemplateSelector : DataTemplateSelector { public DataTemplate AndroidTemplate { get; set; } public DataTemplate IoSTemplate { get; set; } protected override DataTemplate OnSelectTemplate(object item, BindableObject container) { if (IsAndroid()) { return AndroidTemplate; } return IoSTemplate; } private static bool IsAndroid() => DeviceInfo.Current.Platform == DevicePlatform.Android; }
Almost 1 year since this issue was reported and I am still using the solution I provided.
any news?
Description
When using a swipe item in IOS, the IconImageSource does not display the Icon for the SwipeItem in the IOS Simulator. I tested it also with Android and it works there, but not IOS.
To set the images in the Maui Project, I added them to the Resources > Images folder and set the Build Action to MauiImages
IOS - IPhone SE 3rd Gen IOS 16.2
https://user-images.githubusercontent.com/44069136/226203500-ebe6c287-ab98-4b5e-829b-6ac85da13563.mov
Android - Pixel 5 - API 31
https://user-images.githubusercontent.com/44069136/226203492-a514213d-f71a-4272-b3ff-cc3abed44756.mov
Steps to Reproduce