kanmani
kanmani

Reputation: 669

hide tabbar-issue

I'm having tabbar baseed application..

In my TabBar application i want to hide the tabbar when the 2nd view appear.In my second view having imageView with full sapce of that view (320*367)

CGRect imageframe = CGRectMake(0,0,320,367);

imageView = [[UIImageView alloc] initWithFrame:imageframe];

But i dont want to use self.hidesBottomBarWhenPushed = YES;

when i'm using this code self.tabBarController.tabBar.hidden = YES; it hides the tab bar and also it shows a blank space in the tabbar space..

Here,i want to hide the tabbar without white space for tabbar space(i.e., i want to resize the imageview when tabbar hide)

Upvotes: 1

Views: 1359

Answers (3)

Ishu
Ishu

Reputation: 12787

On view will Appear of second view resize the imageView frame.

By

 CGRectFreme imageFrame=self.yourImageView.Frame;

  imageFrame.size.hieght +=50//or what you want

  self.yourImageView.Frame=imageFrame;

And hide tabBar as usual by using self.hidesTabBarWhenPushed.

Upvotes: 2

Erik
Erik

Reputation: 5841

Not sure what the default autorizisingmask is set to.

but you can try to set autoresizingMask:

imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin;

Upvotes: 0

user207616
user207616

Reputation:

you can present your view controller modally:

MyImageViewController *imv = [[MyImageViewController alloc] initWithNibName:@"MyImageViewNib" bundle:nil];];
imv.setSomeProperty = @"image.jpg";
[self presentModalViewController:imv animated:NO];
[imv release];

Upvotes: 1

Related Questions