【问题标题】:show statusbar in camera imagePicker在相机图像选择器中显示状态栏
【发布时间】:2011-09-23 11:16:04
【问题描述】:

我在 imagePicker 上工作,我需要在其中显示带有一些叠加视图的相机。但是它隐藏了状态栏,请告诉我如何在这里显示它是一个代码

imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;

imagePickerController.sourceType = sourceType;

imagePickerController.showsCameraControls = NO;

imagePickerController.cameraViewTransform = CGAffineTransformScale(imagePickerController.cameraViewTransform, 0.5f, 0.5f);


imagePickerController.cameraOverlayView = self.tabBarController.view;

self.navigationController.navigationBarHidden = YES;

imagePickerController.navigationBar.barStyle = UIBarStyleBlack;
[self presentModalViewController:imagePickerController animated:YES];

【问题讨论】:

标签: iphone objective-c ios


【解决方案1】:

试试这个

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES];

【讨论】:

  • 抱歉忘记包含第二行
  • 尝试以下操作:viewDidAppear [self performSelector:@selector(showStatusBar) withObject:nil afterDelay:0.1];并将 [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone] 放入 showStatusBar ...这就是我所得到的......这对我有用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-09-25
  • 1970-01-01
  • 2017-04-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多