No using "hidesBottomBarWhenPushed".
I've tried animating the UITabBar down so that the Y is the same as the self.view.bounds.frame.y. In my viewController I also have a tableView that has a Bottom constraint from the TableView to the SuperView. Call it self.constraintTableViewBottomToSuperViewBottom. I'm setting subtracting to this constraint the height of the tab bar when the views loads. This in combination is visually perfect. The tableView is the exact height it should be, and works properly at the bottom of the view. The problem is... that bottom 44px area where the UITabBar was... is not allowing touch events. I can tap anything there. What am I missing that I also need to animate off the screen (I should mention I'm also animating off the UITabBarController's UITransition view) to receive touches? Can anyone help?
If you're asking yourself "Why in the hell would you want to do this... why not just use hidesBottomBarWhenPushed... I'll include the reasoning below".
I'm using ECSlidingViewController. I believe the solution is I have to stop using this because it's bug is a showstopper, but I want to see if I can hack my way around the issue.
The problem is, hidesBottomBarWhenPushed does not work with ECSlidingViewController and is a known issue. So I cannot use hideBottomBarWhenPushed, because I'm using ECSlidingViewController. I don't want to scrap ECSlidingViewController just yet, I want to see if I can hack my way around a solution.
I tried this code, and it worked perfectly. I didn't have any problem interacting with my app in the space where the tab bar had been.
Something to try... After you hide the tab bar with your custom animation, hide the tab bar with the system call:
It may also be where you're calling your animation. It's possible something in UIKit is messing with the tab bar area after you start animating it. For example, if you started the animation right from the
-viewWillAppear:
call. So try delaying your animation a bit to see if that helps.Notice I chose to use a GCD delay rather than the UIView animation delay. Just to make sure it doesn't mess with the tab bar until after the delay.
Also notice I'm not bothering with auto layout constraints here. Just moving it. Works fine. Stays hidden.