0
votes

I've got a view controller embedded in a navigation controller with a toolbar attached under it so it has this style: enter image description here

as you can see with my storyboard, i also have a container view with a tableviewcontroller inside:

enter image description here

on scroll, i need to hide the navigation bar which I've been able to do. The problem is, I have to also hide the toolbar that is under the nav bar as well as expand the height of the table view so that when the nav bar and toolbar both disappear, the table view can use the extra space.

1
Please post some code not just pictures. Also what have you tried already?Ike10
Is there a reason you are using a container view for your tableView, and not just having your Main View Controller conform to UITableViewDataSource and UITableViewDelegate? I think it might simply your problem.Ike10

1 Answers

0
votes

I don't have perfect answer but try to use below code in cellForRowAtIndexPath will help you..

you did not mentioned weather your code is in objective C/ Swift. I am providing you Both ::

Obj-C

[[self navigationController] setNavigationBarHidden:YES animated:YES];

Swift

self.navigationController().setNavigationBarHidden(true, animated: true)

For tabBar, If you want to hide tabBar with navigationBar use this thing..use this

Or use this for tabBar hide >

DetailViewController *detailViewController = [[DetailViewController alloc] init];
detailViewController.hidesBottomBarWhenPushed = YES;
[[self navigationController] pushViewController:detailViewController animated:YES];    
[detailViewController release];