Fran K.
Fran K.

Reputation: 866

How to transfer animated gif file from Xamarin.Android to Xamarin.iOS?

I've been given a project written for Xamarin.Android and am implementing a version that runs on Xamarin iOS. It relies heavily on Xamarin Forms and most of the work hasn't been too complicated. But I've run into a problem when making iOS images from the Android project. The png files were easily moved by making image assets and naming them after the files they came from.

But the problem I now face is that the original app used a number of animated gifs and I don't see how to get them into the iOS project tree. VSmac doesn't show anything under the Add... menu in the Solution inspector, where I'd hoped to be able to just add a resource and put the gif there. And the Asset UI doesn't provide a way to add a gif, as far as I can see.

I'm new to Xamarin, so I hope I'm not overlooking the obvious, but I cannot find anything, anywhere, about adding and using animated gifs in Xamarin in iOS. What's the trick, if there is one?

Upvotes: 1

Views: 459

Answers (2)

James Westgate
James Westgate

Reputation: 11444

In case anyone else comes across this answer and is a bit confused, don't try to use the asset catalog on iOS, just add it directly to the resource folder as stated in Jasons' answer above. It should just work.

Upvotes: 0

Jason
Jason

Reputation: 89082

you should be able to just "Add Existing File" to the Resources folder in Solution Explorer

Upvotes: 2

Related Questions