Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

White space in place of a hidden tab bar

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?

like image 613
SamehDos Avatar asked Feb 03 '12 11:02

SamehDos


2 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

like image 122
SamehDos Avatar answered Oct 03 '22 09:10

SamehDos


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    
}
like image 23
Mobile App Dev Avatar answered Oct 03 '22 08:10

Mobile App Dev