2014-03-01 32 views
1

enter image description here我可以在iOS 7上的以下方法中推送一個新的視圖控制器,而相同的代碼不適用於iOS 6.在iOS 6上,它推送視圖,但導航欄顯示在狀態欄下方。查看看起來很醜。有人可以有任何想法。由於UIImagePickerController,PushView控制器

已經檢查:

UIImagePickerController's pushViewController misplace pushed view behind the navigation bar

- (void) imagePickerController:(UIImagePickerController *)picker 
     didFinishPickingImage:(UIImage *)image 
        editingInfo:(NSDictionary *)editingInfo 
{ 
    AddEffectViewController *addEffectViewController=[self.storyboard instantiateViewControllerWithIdentifier:@"AddEffectViewController"]; 
    addEffectViewController.originalImage=image; 

    picker.navigationController.navigationBar.translucent = true; 
    [picker setNavigationBarHidden:NO animated:YES]; 
    [picker pushViewController:addEffectViewController animated:YES]; 
} 

回答

0

我曾經和你一樣建立我的照片編輯器,這樣做解決了這對我來說:

在你AddEffectViewController:

- (void)viewWillAppear:(BOOL)animated 
{ 
    [super viewWillAppear:animated]; 
    self.navigationController.navigationBarHidden = YES; 
} 
0

隱藏您的導航欄

self.navigationController.navigationBarHidden = YES; 
相關問題