我有UIViewController
(包含在UINavigationController
中)UITableView
和UIToolbar
。现在当我滚动我的视图时,tableView的末尾和工具栏之间总是有一个空白区域(图中标记为红色)。滚动条此时也会停止。
我试图在故事板中取消选中Adjust Scroll View Insets
,但我的tableView顶部不适合视图。
任何人都可以帮我解决这个问题吗?
编辑:
我正在使用Auto Layout
,我的viewController的storyboard配置如下所示。在之前的viewController中,我使用UITabBar
到UINavigationController
。
答案 0 :(得分:0)
I've found a workaround for that problem:
override func viewDidLoad() {
super.viewDidLoad()
tableView.contentInset = UIEdgeInsetsMake(0, 0, -50, 0)
tableView.scrollIndicatorInsets = tableView.contentInset
}