I use UINavigationController
inside UITabBarController
and one of the screens in my navigationcontroller is a UIImageView
. When I want to show that image full screen I have to hide the navigation bar and tab bar. I'm able to hide the navigation bar correctly but when I hide the tab bar, it leaves 50px of white space. Any suggestion?
-
1Self-contained samples are useful to understand what is going on. Try to edit your question. thank you. – Lorenzo B Feb 03 '12 at 11:57
-
Since iOS 8 all the "will-rotation-functions" are deprecated. [So for now my solution to handle this.][1] [1]: http://stackoverflow.com/a/29772254/2242687 – MPajak Apr 21 '15 at 13:19
6 Answers
Thank you for all I have found the best solution to my problem .
MyImageViewController.hidesBottomBarWhenPushed = YES ;
[self.navigationController pushViewController:MyImageViewController animated:YES];
It gave me the response I wanted . Thank you for your share

- 1,183
- 1
- 10
- 23
I think you can show it on model view controller. Put modelviewcontroller over tabbarcontroller.
FullImageView*objFullImageView = [[FullImageView alloc] initWithNibName:@"FullImageView" bundle:nil];
objFullImageView.image = OriginalImage;
UINavigationController *tempNav = [[[UINavigationController alloc] initWithRootViewController:objFullImageView] autorelease];
[objFullImageView release];
self.tabBarCtrl.modalPresentationStyle = UIModalPresentationPageSheet;
[self.tabBarCtrl presentModalViewController:tempNav animated:YES];
FullImageView.h
{
UIImage *image;
}
@property(nonatomic, retain) UIImage *image;
FullImageView.m
@synthesize image;
viewDidLoad /ViewWillApper
{
//Set image in your UIImageView
}

- 1,824
- 3
- 20
- 45
-
1You have to create a new class. then create object of that class and show that object as modelviewcontroller. I have edit my answer. – Mobile App Dev Feb 03 '12 at 13:03
-
1And you did not require to hide your navigation controller as well as tabbar. – HiddenDeveloper Feb 03 '12 at 13:18
I solved this problem by changing constraints.
I had a view in my tabbar viewController whose bottom constraint was given (=0) from Safe Area.bootom. This was causing white space at the bottom. Changing this constraint to (=0) from Superview.bottom solved my proble.

- 1,579
- 2
- 12
- 23
It's been quite a long time since the original post, but I thought I could jump in and add my thoughts.
Another option would be to set the option Hide bottom bar on push
directly within the Storyboard for all those controllers which are pushed within a navigation controller inside a tabbar controller. This works within iOS7 simulator/targets as well, both at 3.5" and 4".

- 171
- 4
- 11
You can increase the height of your image view frame.

- 187
- 1
- 1
- 5
-
I did it already but it did not make anything . The problem is still exist . – SamehDos Feb 03 '12 at 12:07
After hours of research, this thread resolved my blank space issue when hidding the tabbar: hiding TabBar when rotating iPhone device to landscape