public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
// Get the reused cell from the table view
UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);
// Get the model at this current cell index
LayerStatusModel model = _layers[indexPath.Row];
// If there are no cells to reuse-create one
// We are specifically using Value1 style so text for both layer name and status can be displayed
if (cell == null)
{
cell = new UITableViewCell(UITableViewCellStyle.Value1, cellIdentifier);
}
cell.TextLabel.Text = model.LayerName?? "Layer " + indexPath.Row;
cell.DetailTextLabel.Text = model.LayerViewStatus;
return cell;
}
}