Question

I have 2 view controllers VC1 and VC2

VC1 is a UITableViewController and upon selection of any row it hides the UITabBarController. Then it is pushed to VC2 (here UITabBarController is hidden). Now I added few buttons in the area of UITabBarController with some events on them but the problem is they are not clickable. When I move the buttons anywhere on the view they work very fine.

What should I do?

Was it helpful?

Solution

You can do like this,

    vc2.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc2 animated:YES];

If you dont want to use this code Please let me know the reason.

OTHER TIPS

What is happening is that your Vc belong to UINavigationController , and that UINavigationController is combined with a UITabBarController. And you have hidden tab bar but you have not increased size of vC in it. so Increase height of your Vc after hiding the tab bar.

also in ViewWillAppear of Your VC do this

- (void)viewWillAppear: (BOOL)animated 
{
    self.hidesBottomBarWhenPushed = YES;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top