ListView for Xamarin.iOS: Pull-to-refresh
TKListView can be refreshed by a pull-to-refresh gesture. If enabled, the feature allows the user to refresh data by swiping his finger down when the content is scrolled up to the top. This will trigger an animated activity indicator which will stay visible until data is refreshed.
Enabling pull-to-refresh
Use the AllowsPullToRefresh
property to enable the feature.
Responding to the pull-to-refresh gesture
To be able to respond to the a pull-to-refresh gesture, you will need to implement the ListViewShouldRefreshOnPull
method from the TKListViewDelegate
protocol. After fresh data is available you will need to notify TKListView by calling the didRefreshOnPull
method. This call will allow TKListView to hide the activity indicator and display the fresh data.
ListView Pull to Refresh example can be found in our Native Xamarin.iOS examples.