I'm attempting to create a table/grid like view which i can use for displaying large amounts of information.
The way I have attempted to achieve this is by creating a custom cell view. It's basically UINavigationController
, which i know is incorrect as it needs to be a UIView
in order to add it to the UITableViewCell.ContentView.AddSubView(UiView view)
.
It looks like this:
Then in my table source GetCell()
i have this.
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
int rowIndex = indexPath.Row;
Incident _incident = tableData[rowIndex];
UITableViewCell cell = tableView.DequeueReusableCell(cellID);
if(cell == null)
cell = new UITableViewCell(UITableViewCellStyle.Default, cellID);
CustomCellView content = new CustomCellView();
content.SetRef(_incident.Id);
content.SetDescription(_incident.Description);
cell.ContentView.Add(content);
return cell;
}
Its the cell.ContentView.Add
is where i'm going wrong? I Just need to add the custom view i created in IB to the cells content.