I use a Image inside a Grid, inside a ContentPage.
For GIF support I used "IsAnimationPlaying="True".
The Source is a Binding with the Type ImageSource.
On our android devices (android 10) the gif works fine, but on the iPad it lags and only
moves every 20 seconds.
Add Image to Grid inside ContentPage
<Image
x:Name="LogoImage"
Grid.Column="1"
Margin="0,30,0,30"
IsAnimationPlaying="True"
HeightRequest="64"
Scale="1"
Source="logo.gif" />
Add a GIF as Source
https://giphy.com/gifs/dance-disney-following-njS7fzNbKflZu
https://vimeo.com/user109786287/review/398006783/343fc16467
Version with issue: 4.5.0.356
Last known good version: /
IDE: Visual Studio 16.4.6
Platform Target Frameworks:
iOS: 13.10.0.21
Android: 10.1.4.0
Affected Devices: iPad Air 2 iOS 13.3 (we only have one device atm)
Hello,
I made a new xamarin project on Visual Studio Mac (version 8.4.8 (build 2) [Master/Detail-Forms-App].
I attached testGIF to this post.
testGIF.zip
On the iPad Air 2 (ipadOS 13.3) the gif lags and on the redmi note 8 (android 9) it works fine.
I would swear that I commented on this before 馃 I would not place it under "needs info" without commenting on it.
Anyway, I have tried your reproduction and I don't see any lag whatsoever. I am using the Simulator. Did you try that as well? Or just a physical device? Also, the Vimeo link is not working, so I don't see what you're seeing. Would you be able to reshare that?
Thanks for the answer.
I only used a physical device for testing, but I can surely test it on the simulator.
The video is on my computer at the office, I will test it again on monday and keep you updated.
Have a nice weekend 馃槈
Good morning,
you were right, it worked perfect on the simulators. (IPhone 11 IOS 13.3 & IPone 11 Pro Max 13.3)
But on the physical devices like the iPad Air 2 (IOS 13.3) or a IPhone 6s (IOS 13.3.1) it lags.
Here is a link to the video, to show how it looks.
As you can see the small "kuzco" only moves every x seconds.
(at 17 seconds and 26 seconds)
Thanks for the video! I have tried it on my iPhone Xs physical device and it also works perfectly there. So this is turning out to be a hard one 馃槄
Of course the hardware is a bit dated. I know I'm asking a lot but would you maybe be able to show a gif on a plain Xamarin.iOS project without Forms and/or a fully native project done in Obj-C/Swift? That way we can determine if its something we did or maybe just because iOS is slowing it down?
While typing this I'm thinking; what is the battery status on these devices? Seeing that Apple slows down the hardware if they fall below a certain value?
No problem.
While testing the IPad had a battery status of 98 %.
So I tested it on the IPad Air 2 with the following projects:
Swift native code
https://github.com/swiftgif/SwiftGif
Xamarin IOS
https://github.com/MarcusCoding/test
(using the FFImageLoading Library)
Both projects were completely fine on the IPad.
While typing this I edited the testGIF project and added FFImageLoading to it.
Using those 2 lines in the AppDelegate.cs from testGIF.IOS made every gif work:
FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
CachedImageRenderer.InitImageSourceHandler();
Now every gif works fine in it. That's a pretty interesting behaivor.
That _is_ interesting. Thank you for all your cooperation in this, we really appreciate it.
So, at least it's clear that it must have something to do with our implementation then somehow. @PureWeen any ideas?
I reproduce the problem on an iPad Mini 5 with iOS 13.4.1.
Reproduced on iPhone 11, iOS 13.5.0.
Edit: And iOS 13.5.1
Edit2:
Tested on some simulators:
Gif works fine on iPhone 11, iOS 13.5 Simulator
Gif DOES NOT work on iPhone 8, iOS 13.5 Simulator.