2011-01-14 62 views
1

我遇到的TabBar baseed應用..隱藏的TabBar發出

在我的TabBar應用程序,我想隱藏的TabBar當第二視圖appear.In我有與視圖的全sapce ImageView的第二視圖(320 * 367)

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

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

,但我不想當我使用此代碼使用self.hidesBottomBarWhenPushed = YES;

self.tabBarController.tabBar.hidden = YES;它隱藏的標籤欄,也顯示在標籤欄空間的空白..

在這裏,我想隱藏tabbar空白的tabbar沒有空白空間(即,我想調整tabview隱藏時的圖像視圖)

回答

2

上觀看會出現第二種觀點的調整ImageView的框架。

通過

CGRectFreme imageFrame=self.yourImageView.Frame; 

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

    self.yourImageView.Frame=imageFrame; 

而且隱藏的TabBar像往常一樣使用self.hidesTabBarWhenPushed。

1

您可以將您的視圖控制器模態:

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

不知道什麼是默認autorizisingmask設置爲。

,但你可以嘗試設置autoresizingMask:

imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin;