开发者

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 ta开发者_如何学Pythonbbar 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)


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.


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];


Not sure what the default autorizisingmask is set to.

but you can try to set autoresizingMask:

imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜