UIImagePickerController,PushView控制器

时间:2014-03-01 00:21:22

标签: ios iphone objective-c ios6.0

enter image description here我能够在iOS 7下面的方法中推送一个新视图控制器,而相同的代码在iOS 6上不起作用。在iOS 6上它推送视图但导航栏显示在状态栏下方。看起来很难看。有人可以有任何想法。感谢

已经检查过:

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

2 个答案:

答案 0 :(得分:0)

我和你建立我的照片编辑器一样,这样就解决了它:

在AddEffectViewController中:

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

答案 1 :(得分:0)

隐藏导航栏

self.navigationController.navigationBarHidden = YES;