Tag: 状态栏

如何在UIImagepickercontroller中隐藏状态栏?

我是iOS开发新手。 我想隐藏状态栏在UIImagePickerController 。 每当我点击“拍照”,就会出现状态栏。 它不隐藏。 我只想在UIImagePickerController隐藏状态栏。 这是我的代码, – (IBAction)takePhoto:(UIButton *)sender { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = YES; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentViewController:picker animated:YES completion:NULL]; } – (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [self statusBar:YES]; UIImage *chosenImage = info[UIImagePickerControllerEditedImage]; self.imageView.image = chosenImage; [picker dismissViewControllerAnimated:YES completion:NULL]; } – (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { [picker […]