Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Animation working on Android not working on iOS!

$
0
0

Hi,

I have the following XAML:

    <ListView SeparatorVisibility="None" x:Name="Categoriess" IsVisible="True" ItemTapped="Categories_OnItemSelected" HasUnevenRows="False"  HorizontalOptions="StartAndExpand">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell Appearing="CategoryMainAppearing" >
                                <ViewCell.View>
                                    <StackLayout VerticalOptions="Center">
                                        <Grid RowSpacing="25">
                                            <Grid.RowDefinitions>
                                                <RowDefinition  Height="*"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="5*"/>
                                                <ColumnDefinition Width="90*"/>
                                                <ColumnDefinition Width="5*"/>
                                            </Grid.ColumnDefinitions>

                                            <forms:CachedImage VerticalOptions="Center" Grid.Column="0" Source="{Binding image}" />
                                            <Label VerticalOptions="Center"  Text="{Binding name}" Grid.Column="1" />

                                            <!--<Label Text=" > " FontSize="Medium" Grid.Column="2" />-->
                                        </Grid>
                                    </StackLayout>
                                </ViewCell.View>
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>

And here is my code behind:

    Categoriess.TemplatedItems.Last().Appearing += LastAppered;


  private async void LastAppered(object sender, EventArgs e)
        {
            //await Task.Delay(500);


            foreach (var cell in Categoriess.TemplatedItems)
            {
                var item = (ViewCell)cell;

                var children = item.LogicalChildren.ToList();
                //await item.View.TranslateTo(500, 0, 7, Easing.SinIn);
                await item.View.TranslateTo(0, 0, 200, Easing.SinInOut);
            }


        }

It is working perfectly fine on Android but on iOS I can't even hit a breakpoint (LastAppeared is not even being called!)


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>