TableView Showing Behind Tab Bar
36,322
Solution 1
Try setting
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;
self.automaticallyAdjustsScrollViewInsets = NO;
Inside the tableview controller
Solution 2
Swift 4.x
let adjustForTabbarInsets: UIEdgeInsets = UIEdgeInsetsMake(0, 0, self.tabBarController!.tabBar.frame.height, 0)
self.yourTableView.contentInset = adjustForTabbarInsets
self.yourTableView.scrollIndicatorInsets = adjustForTabbarInsets
Solution 3
Check the screen shot
Check the under top Bar and Un-checke under Bottom Bar
Solution 4
SWIFT 3
put this inside viewDidLoad
of your tableViewController
:
self.edgesForExtendedLayout = UIRectEdge()
self.extendedLayoutIncludesOpaqueBars = false
self.automaticallyAdjustsScrollViewInsets = false
Solution 5
Swift 3.0
This is what worked for me. In your Custom ViewController:
override func viewDidLoad() {
super.viewDidLoad()
let adjustForTabbarInsets: UIEdgeInsets = UIEdgeInsetsMake(self.tabBarController!.tabBar.frame.height, 0, 0, 0);
//Where tableview is the IBOutlet for your storyboard tableview.
self.tableView.contentInset = adjustForTabbarInsets;
self.tableView.scrollIndicatorInsets = adjustForTabbarInsets;
}
Related videos on Youtube
Author by
raginggoat
Updated on May 28, 2021Comments
-
raginggoat almost 3 years
I am updating my app to use iOS 7 and I'm having a problem with a table view. My tab bar is translucent. The problem is when I scroll to the bottom of my table view, part of the last cell is still behind the tab bar. I'd like to have a bit of space between the last cell and the tab bar. I could fix this by using an opaque tab bar instead, but I want to keep it translucent.
-
Wimukthi Rajapaksha about 4 yearsTry this, stackoverflow.com/a/61716499/10505343
-
-
Slavcho about 10 yearsYes, its working but suddenly my tabBar changed color.
-
Johnykutty about 10 yearscan you tell the color change from which color to which color?
-
Slavcho about 10 yearsWell first was white, and then changed to some gray with gradient. But after manual change to white color, everything is fine. Just wondering why that happened.
-
Litome about 7 yearsThe edge Inset should be for the bottom though, not the top:
let adjustForTabbarInsets: UIEdgeInsets = UIEdgeInsetsMake(0, 0, self.tabBarController!.tabBar.frame.height, 0);
-
towry almost 7 yearsNot working, the last cell is still behind the tab bar.
-
Dot Freelancer over 6 yearshow can i uncheck it programmatically? i couldn't do it programmatically
-
inokey about 6 yearsWorks fine on iOS 11 (both iPhone 7 & iPhone X), doesn't work on iOS 10
-
Yogesh Patel almost 5 yearsThanks @Hemang, Working For me but I have another issue when I press In NavigationBar Searchbar it gives me the space between NavigationBar and TableView. if you have any solution for this then please update me. Great Job