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?

有帮助吗?

解决方案

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.

其他提示

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;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top