Мне нужно удалить строку состояния, когда сделайте снимок y, попробуйте, но не работает.
[[UIApplication sharedApplication] setStatusBarHidden: YES withAnimation: UIStatusBarAnimationSlide];
- (IBAction)botonCamara:(id)sender {
// Make sure camera is available
if ([UIImagePickerController
isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == NO)
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Camera Unavailable"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil, nil];
[alert show];
return;
}
if (imagePicker == nil)
{
imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsEditing = YES;
}
[self presentViewController:imagePicker animated:YES completion:NULL];
}
#pragma mark - delegate methods
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
UIImageWriteToSavedPhotosAlbum (image, nil, nil , nil);
[self dismissViewControllerAnimated:YES completion:NULL];
}