2012-03-07 27 views
2

我有一個小問題,我的iPhone應用程序。在我的UIView筆尖上,在通話狀態欄出現後消失,視圖無法正確調整大小。具體來說,導航欄的頂部隱藏在狀態欄下方。iOS的通話中的狀態欄上書寫頂部導航欄

這三個圖像顯示了前,中,在通話狀態欄後。我的問題顯示在最後一張圖片中。 Images

我所說的筆尖使用此代碼:

- (IBAction)showMapClicked:(id)sender 
{ 
    if (childController == nil) { 
     childController = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; 
    } 

    [self.navigationController pushViewController:childController animated:YES]; 
} 

我發現這太問題,但它似乎並沒有覆蓋我有問題: Resize for in-call status bar

感謝您的任何深入瞭解如何解決。

回答

3

我已經成功地解決了這一個。我使用此代碼隱藏頁面上的標籤欄和它搞亂了頁面的頂部:

CGRect bounds = [[UIScreen mainScreen] bounds]; 
CGRect tabBarFrame = self.tabBarController.tabBar.frame; 
self.tabBarController.view.frame = GRectMake(0, 0, bounds.size.width, bounds.size.height+tabBarFrame.size.height); 

我應該做的是實現這個:

- (BOOL)hidesBottomBarWhenPushed { return YES; }