2

SubViewController( ViewControllerand的子级IndicatorInfoProvider) 使用MainViewController(a child of ButtonBarPagerTabStripViewController) with NavigationBaradded 添加。

即使您点击 tabbutton 也不会发生填充,滑动时会在顶部发生填充。

动画 gif

https://i.stack.imgur.com/VRLg7.gif

override func viewDidLoad() {
    super.viewDidLoad()
    print("viewDidLoad")
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.clear

    //tableview
    self.tableView.delegate = self
    self.tableView.dataSource = self
    self.tableView.backgroundView = nil
    self.tableView.backgroundColor = UIColor.clear

    //動的に高さを変更
    self.tableView.estimatedRowHeight = 155
    self.tableView.rowHeight = UITableViewAutomaticDimension

    //indicator
    self.tableView.showIndicator()

    //loaddata
    loadData(page:0)

}
4

2 回答 2

2

我遇到了同样的问题。打开故事板并选择MainViewController. 在属性检查器中取消选中复选框“调整滚动视图插图

于 2017-02-20T16:13:26.940 回答
0

您是否使用 UITableViewController 作为 childViewController?这个问题似乎发生在这种情况下。

要解决此问题,您应该设置automaticallyAdjustsScrollViewInsets = false并仅将 childViewControllers 设置为UIViewControllers内部UITableView,而不是UITableViewController.

干杯

于 2017-05-15T17:17:05.840 回答