UITableViewSource.GetCell(UITableView, NSIndexPath) Method

Definition

Called by the table view to get populate the row at indexPath with a cell view.

[Foundation.Export("tableView:cellForRowAtIndexPath:")]
public abstract UIKit.UITableViewCell GetCell (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath);
abstract member GetCell : UIKit.UITableView * Foundation.NSIndexPath -> UIKit.UITableViewCell

Parameters

tableView
UITableView

Table view requesting the cell.

indexPath
NSIndexPath

Location of the row where the cell will be displayed.

Returns

An object that inherits from UITableViewCell that the table can use for the specified row. Do not return null or an assertion will be raised.

Attributes

Remarks

This method is called once for each row that is visible on screen. During scrolling, it is called additional times as new rows come into view. Cells that disappear from view are cached by the table view. The implementation of this method should call the table view's DequeueReusableCell(NSString) method to obtain a cached cell object for reuse (if null is returned, create a new cell instance). Be sure to reset all properties of a reused cell.

Declared in [UITableViewDataSource]

Applies to