Can you please share code snippets or direct me to the xamarin docs, how to implement UITableView, scroll to load more functionality.
How to detect if the tableview
inside the TableViewSource class override this method
public override void WillDisplay (UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
{
if (indexPath.Row == tableItems.Count - 1) {
//Reload your data here
}
}
constructor TableViewSource class
isScrolling = false;
inside the TableViewSource class override this method
public override void Scrolled (UIScrollView scrollView)
{
// load more bottom
float height = scrollView.Frame.Size.Height;
float distanceFromBottom = scrollView.ContentSize.Height - scrollView.ContentOffset.Y;
if(distanceFromBottom < height && isScrolling == false)
{
// reload data here
}
}