GetHeightForHeader and GetViewForHeader not called

前端 未结 2 588
轮回少年
轮回少年 2021-01-13 22:35

I am working on a tableview which has two sections. And I would like to add a headerView in the second section header.

I have implemented the following code. It cal

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-13 23:23

    Had the same issue, I just forgot to set the delegate in viewDidLoad

    public override void ViewDidLoad()
    {
         base.ViewDidLoad();
    
         TableView.DataSource = new YourViewControllerTableDataSource();
         TableView.Delegate = new YourViewControllerTableDelegate();
    
    }
    

提交回复
热议问题