0

I have gallery view in my iphone app. On tap gesture, I am hiding the Navigation bar by:

[self.navigationController setNavigationBarHidden:activated animated:YES];

I have tab bar also, how to hide it and display the image as full screen?

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
Shameem
  • 14,199
  • 13
  • 40
  • 43

4 Answers4

3
CATransition *animation = [CATransition animation];
[animation setType:kCATransitionFade];
[[self.view.window layer] addAnimation:animation forKey:@"layerAnimation"]; 
[self.tabBarController.tabBar setHidden:YES];

// Display tab bar animated
CATransition *animation = [CATransition animation];
animation setType:kCATransitionFade];
[[self.view.window layer] addAnimation:animation forKey:@"layerAnimation"]; 
[self.tabBarController.tabBar setHidden:NO];

I have not checked this code but I think it will work

Vidya Murthy
  • 530
  • 1
  • 8
  • 22
Rama Rao
  • 1,043
  • 5
  • 22
2
[[self navigationController] setHidesBottomBarWhenPushed:YES];

i hope this will help you.

animuson
  • 53,861
  • 28
  • 137
  • 147
Preetham
  • 125
  • 1
  • 11
1
self.hidesBottomBarWhenPushed = YES;
this will hide the tabbar 
Rama Rao
  • 1,043
  • 5
  • 22
0

If it a UITabBarController then it has a property tabBar.

tabBarController.tabBar.hidden = YES

should work for you. Also if your image is not a full size then change the frame of UIImageView to CGRectMake(0, 0, 320, 460); if you are showing a status bar.

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
  • 1
    Getting a white bar in the bottom (in the place of tab bar) which comes on top of the image (even after hiding tab bar & resizing the imageview frame). – Shameem Feb 29 '12 at 15:30