Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

joak

macrumors newbie
Original poster
Mar 7, 2014
27
0
Hi

How you can see at file attached ... I have two UIviewControllers, "Cedula Arbitral - Partidos has a TableView object, when the user tap on a row, show it the last UIViewController (all black) with this code on didSelectRowAtIndexPath
Code:
[self.navigationController pushViewController:tablero animated:YES];

It's possible to hide the tap bar on the last UIVieController?
 

Attachments

  • hoy.png
    hoy.png
    33.1 KB · Views: 118
Have you tried a modal segue instead of push?

If you aren't using storyboards this could be even easier.
 
Isn't there an option in the storyboard to "Hide bottom bar when pushed"

I believe it corresponds to

Code:
@property(nonatomic) BOOL hidesBottomBarWhenPushed

which is a property of UIViewController. Not sure if this applies to the tab bar because the documentation states it is used to hide a toolbar, but you might give it a shot.
 
I found two methods(hideTabBar-showTabBar).... only hideTabBar method works fine ..... showTabBar method doesn't work ... both method are on UIViewController child .... when the user tap on "Back" botton on Navigation bar, I trigger the showTabBar method

Any ideas?

Code:
- (void)didMoveToParentViewController:(UIViewController *)parent
{
    if (![parent isEqual:self.parentViewController]) {
        NSLog(@"Back pressed");
        [self showTabBar:self.tabBarController];
    }
}


Code:
- (void)hideTabBar:(UITabBarController *) tabbarcontroller
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.5];
    
    for(UIView *view in tabbarcontroller.view.subviews)
    {
        if([view isKindOfClass:[UITabBar class]])
        {
            [view setFrame:CGRectMake(view.frame.origin.x, 480, view.frame.size.width, view.frame.size.height)];
        }
        else
        {
            [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 480)];
        }
    }
    
    [UIView commitAnimations];
}


- (void)showTabBar:(UITabBarController *) tabbarcontroller
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.5];
    for(UIView *view in tabbarcontroller.view.subviews)
    {
        NSLog(@"%@", view);
        
        if([view isKindOfClass:[UITabBar class]])
        {
            [view setFrame:CGRectMake(view.frame.origin.x, 431, view.frame.size.width, view.frame.size.height)];
            
        }
        else
        {
            [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 431)];
        }
    }
    
    [UIView commitAnimations];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.