Binding to iOS
See original GitHub issueI’m pretty sure I discovered why my iOS project wasn’t rendering but my Android was.
My Animation in the XAML was set as a Binding (See Below). Once I changed it to the filename vs. setting it after it seems to work. I had to remove the Xamarin.Forms.iOS nuget and copy and paste the Renderers for the platform. But now its working.
<customRenderer:AnimationViewLottie VerticalOptions="StartAndExpand" HorizontalOptions="CenterAndExpand" x:Name="animationView" Animation="{Binding AnimationResource}" BackgroundColor="Transparent" WidthRequest="200" HeightRequest="200" Loop="True" AutoPlay="True"/>
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Binding iOS Libraries - Xamarin
This page provides a step-by-step walkthrough of creating an iOS binding project using the open source InfColorPicker Objective-C project as an ...
Read more >Binding | Apple Developer Documentation
A binding connects a property to a source of truth stored elsewhere, instead of storing data directly. For example, a button that toggles...
Read more >What is the @Binding property wrapper? - a free SwiftUI by ...
@Binding lets us declare that one value actually comes from elsewhere, and should be shared in both places. This is not the same...
Read more >Unable to build iOS Binding Library wrapping iOS ...
Description I am attempting to update a project from Xamarin.Forms to Maui, that uses a binding project to wrap an iOS .framework library....
Read more >Xamarin Bindings Libraries, an iOS part (2/3) – Blog
Find the library you want to use in your Xamarin.iOS app online and download to anyfolder. Go to the [Packagename].framework folder. It should ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok, I have finally nailed it - in iOS project of Forms app you need to call:
AnimationViewRenderer.Init();
just before
LoadApplication(new App());
I haven’t seen it documented anywhere. Also at least for my example code
HorizontalOptions
andVerticalOptions
ofAnimationView
element have to be set toFillAndExpand
or nothing is shown (seems like a bug to me).I’m having the same issue, I’ve tried with and without extension. From XAML and code. Also with a little delay (Allowing all the screen to full charge), in fact, I don’t have lucky.
My final try is initiating Lottie from native iOS project and all was correct.