Modifier

Partager via


UITableView.RowHeight Property

Definition

The height of each row in this UITableView.

public virtual nfloat RowHeight { [Foundation.Export("rowHeight")] get; [Foundation.Export("setRowHeight:")] set; }
member this.RowHeight : nfloat with get, set

Property Value

Row height in points.

Attributes

Remarks

This property can be set if the GetHeightForRow(UITableView, NSIndexPath) has not been implemented. If the row height is not set explicity the table view uses a default value.

There are performance implications to using GetHeightForRow(UITableView, NSIndexPath) instead of this property: every time a table view is displayed it calls GetHeightForRow(UITableView, NSIndexPath) 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).

If every row in a table has the same height, use this property. If rows have different heights (for example, they are sized around a variable amount of text) then GetHeightForRow(UITableView, NSIndexPath) is more appropriate.

Applies to