UITableViewDataSource.GetCell(UITableView, NSIndexPath) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Implements
- 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 RegisterClassForCellReuse(Type, String) or RegisterNibForCellReuse(UINib, String) have not been called during initialization, application developers must check the result of DequeueReusableCell(String, NSIndexPath) for null
and instantiate a new UITableViewCell as necessary).
Once a cell is retrieved, all of its relevant properties must be set based on the indexPath
.