我能够在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];
}
答案 0 :(得分:0)
我和你建立我的照片编辑器一样,这样就解决了它:
在AddEffectViewController中:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.navigationBarHidden = YES;
}
答案 1 :(得分:0)
隐藏导航栏
self.navigationController.navigationBarHidden = YES;