简体   繁体   中英

How can I remove this bottom margin on my UITableView in iOS?

I have a UITableView as one of the (two) view controllers of a UITabBarController. The tab bar on the UITabBarController is hidden though, but this suits our UX because we wanted the user to be able to switch back and forth between two main screens.

The problem we're seeing, is a margin at the bottom of each of the UITableViewControllers inside the UITabBarController—I assume this is because the tab bar controller expects the tab bar to be visible.

The "Load more" button is the last UITableViewCell in the UITableView.

As you can see in the screenshot below, there's a bottom-margin between the scroll-bar on the right and the actual bottom of the UITableView.

How can I get rid of this margin, and reduce all of the white (grey) space between the last cell and the bottom of the view?

在此处输入图片说明

Goto Storyboard -> Attribute inspector

ViewController Section -> Layout -> Uncheck Adjust Scroll View Insets

在此处输入图片说明

Hope this help.

转到情节提要,然后在包含表视图的ViewController中取消选中“调整滚动视图插图”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM