I am following the tutorial on
ViewController:
public override void ViewDidLoad()
{
base.ViewDidLoad();
LiveTrackTableView.RegisterClassForCellReuse(typeof(LiveTrackTableCell), CellId);
DataSource tableSource = new DataSource();
LiveTrackTableView.Source = tableSource;
}
TableView:
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
// if cell is not available in reuse pool, iOS will create one automatically
// no need to do null check and create cell manually
var cell = (LiveTrackTableCell)tableView.DequeueReusableCell(HomePageLiveTrackController.CellId, indexPath);
cell.UpdateCell(indexPath);
return cell;
}
CellView:
public partial class LiveTrackTableCell : UITableViewCell
{
public LiveTrackTableCell (IntPtr handle) : base (handle)
{
}
internal void UpdateCell(NSIndexPath indexPath)
{
Console.WriteLine(ThreadTitle.Text);
}
}
The error occurs where "Console.WriteLine(ThreadTitle.Text);" is at. The label is created in xamarin storyboard, how do I instantiate the label in code?