tags:

views:

56

answers:

2

HI all,

u all must have notices in iphone photo gallery, wen u open pic, the tabbar and navigation bar do some hide and show functionality. wen we tap, both appears and after sometime, they get disaapaer..

I want to do exactlly like that, how can i do it??? wen user taps, both gets appear and after a dealy of say 5 sec, they get disaapear.

regards

+1  A: 

it is toolbar not tabbar.
in .h file

IBoulet UINavigationController *navigationController;

IBoulet UIToolBar *toolbar;

connect IBoulet in in XIB

in .m file

  • (void)viewDidLoad {

    [super viewDidLoad];

    [navigationController setNavigationBarHidden:YES];

    toolbar.hidden = True;

}

  • (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject];

    if (touch.tapCount == 2) {

         [navigationController setNavigationBarHidden:NO];
         toolbar.hidden = False;
    
    
    
     [NSTimer scheduledTimerWithTimeInterval:(1.0) target:self   selector:@selector(hideBar) userInfo:nil repeats:NO];
    

    }

}

-(void)hidebar{

[navigationController setNavigationBarHidden:YES];

toolbar.hidden = True;

}

priyanka
Thanks for replying.....i did everything u mentionedbut on first time only, on double tap, both gets hide and after some delay app gets crashed....."*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DetailViewController hideBar]: unrecognized selector sent to instance 0x7b28c20'"
shishir.bobby
+1  A: 

If you're using priyanka's code, the toolbar.hidden = TRUE (all caps!) and fix that everywhere else as well.

The accepted values for a BOOL are YES, NO, TRUE, FALSE, 0, and 1.

MishieMoo
yea i manipulated her code, there waz typo...got it running.....finally
shishir.bobby