Shameem
Shameem

Reputation: 14349

iPhone: How to hide tab bar to show fullscreen view

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?

Upvotes: 0

Views: 3020

Answers (4)

Preetham
Preetham

Reputation: 125

[[self navigationController] setHidesBottomBarWhenPushed:YES];

i hope this will help you.

Upvotes: 2

Rama Rao
Rama Rao

Reputation: 1033

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

Upvotes: 3

Inder Kumar Rathore
Inder Kumar Rathore

Reputation: 39988

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.

Upvotes: 0

Rama Rao
Rama Rao

Reputation: 1033

self.hidesBottomBarWhenPushed = YES;
this will hide the tabbar 

Upvotes: 1

Related Questions