Edit

Share via


UITableViewSource.GetHeightForRow(UITableView, NSIndexPath) Method

Definition

Called to determine the height of the row at indexPath.

[Foundation.Export("tableView:heightForRowAtIndexPath:")]
public virtual nfloat GetHeightForRow (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath);
abstract member GetHeightForRow : UIKit.UITableView * Foundation.NSIndexPath -> nfloat
override this.GetHeightForRow : UIKit.UITableView * Foundation.NSIndexPath -> nfloat

Parameters

tableView
UITableView

Table view.

indexPath
NSIndexPath

Location of the row.

Returns

The height of the row (in points) as a float.

Attributes

Remarks

This method allows rows to have different heights (for example, rows that contain a variable number of text lines). If this method is implemented, it overrides the RowHeight property set on the table view, for the row at indexPath.

There are performance implications to using this method instead of RowHeight: every time a table view is displayed it calls this method for each of its rows. This can result in poor performance when the table has a large number of rows (for example, 1000 rows or more).

Declared in [UITableViewDelegate]

Applies to