简体   繁体   中英

UIImagePickerController's pushViewController misplace pushed view behind the navigation bar

When I push a view controller into UIImagePickerController object, the view controller's view is misplaced behind the navigation bar. no matter what I choose as image picker source. I present image picker modally and do the following in its delegate

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  [[UIApplication sharedApplication] setStatusBarHidden:NO];
  [picker setNavigationBarHidden:NO];

  SecondViewController *secondVC = [[SecondViewController alloc] init];
  [picker pushViewController:secondVC animated:YES];
  [secondVC release];
}

and in SecondViewController's doing nothing special.

When I pushed the same view controller into UINavigationController's object, it is placed correctly beneath the navigation bar. What should I do additionally to use image picker as navigation controller?

我应该在推第二个视图控制器之前设置图像选择器的导航栏的半透明属性NO。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM