Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

iOS Remove ListView Animations (Add & Update Rows)

$
0
0

How can i remove the add/update rows animation from a listview in iOS?
In my custom ListViewRenderer i can access UITableViewRowAnimation, since the base ListViewRenderer has them:

public class ListViewRenderer : ViewRenderer<ListView, UITableView>
{
        ....

        protected UITableViewRowAnimation InsertRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation DeleteRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation ReloadRowsAnimation { get; set; } = UITableViewRowAnimation.Automatic;
        protected UITableViewRowAnimation ReloadSectionsAnimation
        {
            get { return _dataSource.ReloadSectionsAnimation; }
            set { _dataSource.ReloadSectionsAnimation = value; }
        }
        ....
}

When i try to set "InsertRowsAnimation" and "DeleteRowsAnimation" to "UITableViewRowAnimation.None" in my Renderer at OnElementChanged, it doesn't seem to do anything. The listview is still animated.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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