Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 Custom TableView Is Under TabBar

Im trying port my app to iOS7, but my custom TableViewController is showing the last row (cell) under the TabBar :(

Im searching a lot for it, but i dont find any solution. Can anyone help me?

My Custom Table View class

The error is shown in the blow screenshot (only is showing a part of last product because im draging to up to show the hidden product under the tabbar):

screenshot

Thanks.

like image 866
Paulo Coutinho Avatar asked Oct 04 '13 05:10

Paulo Coutinho


People also ask

How do I hide tabBar when pushing?

You can do this in storyboard now: Select the UIViewController in your storyboard. Select the checkbox Hide Bottom Bar on Push.

What is tabBar in Swift?

The tab bar interface displays tabs at the bottom of the window for selecting between the different modes and for displaying the views for that mode. This class is generally used as-is, but may also be subclassed. Each tab of a tab bar controller interface is associated with a custom view controller.

How do I add a tabBar?

To add a tab, first drag a new View Controller object to the storybard. Next control-drag from the tab bar controller to new view controller and select view controllers under Relationship Segue . Your tab bar controller will update with a new tab.


2 Answers

I've got the same problem and solved it using storyboard. At Tab Bar Controller, go to attribute inspector, Simulated Metrics, and set the Bottom Bar to Opaque Tab Bar. That's it! See image bellow for description. enter image description here

Saudações! (Greetings!)

like image 61
José Flávio Avatar answered Oct 11 '22 12:10

José Flávio


I found the answer to your question on another post, answered by dariaa, here:

Tab Bar covers TableView cells in iOS7

It worked great for me.

Please no credit for me, because I'm not the original guy who solved it.

In your custom TableViewController, add these two lines under [super viewDidLoad]:

- (void)viewDidLoad {     [super viewDidLoad];      self.edgesForExtendedLayout = UIRectEdgeAll;     self.tableView.contentInset = UIEdgeInsetsMake(0., 0., CGRectGetHeight(self.tabBarController.tabBar.frame), 0);  }  
like image 27
Wojtek Avatar answered Oct 11 '22 13:10

Wojtek