Section Headers in UITableView when inset of tableview is changed

前端 未结 4 2061
刺人心
刺人心 2021-02-01 07:18

I have implemented a \"Pull to refresh\" in my tableView like the iPhone app Twitter or Facebook.
My tableView has sections with head views. When the tableView is in \"Refre

4条回答
  •  感情败类
    2021-02-01 07:51

    Try this way to add push view controller.

    • Create a table view controller and add it as the sub view of existing view controller.
    • Then assign your table view and refresh controllers to tableview controller's properties.

      UITableViewController *newTableViewController = [[UITableViewController alloc] init];
      newTableViewControler.tableView = ;
      
       = [[UIRefreshControl alloc] init];
      [ addTarget:self
                                  action:@selector(refreshTableView:)
                        forControlEvents:UIControlEventValueChanged];
      
      newTableViewController.refreshControl = _chatListRefreshControl;
      [self addChildViewController:newTableViewController];
      

提交回复
热议问题