i need a UIImagePickerCOntroller, so that the User can take some photos. This is my Code:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
UIImagePickerController * imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.delegate = self;
imagePicker.showsCameraControls = YES;
imagePicker.allowsEditing = YES;
imagePicker.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:imagePicker animated:YES completion:nil];
}
For the first time i open the UIImagePickerController everything works fine! But for the Second, third... time i always get this:
As you can see the Camera Controls above gets cut. It looks like the StatusBar is the Problem. I tried everything like:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
or
[[UIApplication sharedApplication] setStatusBarHidden:YES];
But nothing worked. Maybe an Apple Bug?