Calculating variable row height in GetHeightForRow

Download xamarin.ios eBook


Calculating row heights might be expensive and scrolling performance can suffer if you have larger amounts of data. In that scenario, override UITableViewSource.EstimatedHeight(UITableView, NSIndexPath) to quickly provide a number sufficient for rapid scrolling, e.g.,:

public override nfloat EstimatedHeight(UITableView tableView, NSIndexPath indexPath) 
    return 44.0f; 

Related Examples


120 Contributors: 2
Thursday, October 13, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook