How iOS UITableView under NavigationBar?

后端 未结 5 1299
渐次进展
渐次进展 2021-01-11 15:17

I have set

NavigationController.NavigationBar.Translucent = true;

Then add table and set frame to RootView Frame, and:

             


        
5条回答
  •  难免孤独
    2021-01-11 15:35

    This worked for me

    let yOffset = UIApplication.shared.statusBarFrame.height + self.navigationController!.navigationBar.frame.size.height
    tableView.contentInset = UIEdgeInsetsMake(yOffset, 0, 0, 0)
    

提交回复
热议问题