Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9073569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:26:52+00:00 2026-06-16T18:26:52+00:00

Has anyone ever had this problem before? I’m using the UIImagePickerController Camera to take

  • 0

Has anyone ever had this problem before? I’m using the UIImagePickerController Camera to take photos with my application, and I noticed the photos are not being stored in the photo library after being taken. I’ve tried it both on iOS5 with the iPhone4 and iOS6 with the iPhone5 and same result. Here is how I’m setting it up:

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
    imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
}

imagePickerController.delegate = self;
[self.navigationController presentModalViewController:imagePickerController animated:YES];
[imagePickerController release];

Seems as though the UIImagePickerController should implicitly save a photo that’s taken to the users photo library? Any help would be appreciated thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T18:26:53+00:00Added an answer on June 16, 2026 at 6:26 pm

    Try following code.

    -(IBAction)useCamera
    {
     if ([UIImagePickerController isSourceTypeAvailable:
          UIImagePickerControllerSourceTypeCamera])
     {
      UIImagePickerController *imagePicker =
      [[UIImagePickerController alloc] init];
      imagePicker.delegate = self;
      imagePicker.sourceType =
      UIImagePickerControllerSourceTypeCamera;
      imagePicker.mediaTypes = [NSArray arrayWithObjects:
                                (NSString *) kUTTypeImage,
                                nil];
      imagePicker.allowsEditing = NO;
      [self presentViewController:imagePicker animated:YES completion:nil];
      newMedia = YES;
     }
    }
    
    #pragma mark- camera picker delegate methods
    
    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
    {
     NSString *mediaType = [info
                            objectForKey:UIImagePickerControllerMediaType];
    
     [self dismissViewControllerAnimated:YES completion:nil];
    
     if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) {
      UIImage *image = [info
                        objectForKey:UIImagePickerControllerOriginalImage];
    
      [imageView setAutoresizingMask:(UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth)];
      imageView.image = image;
      if (newMedia)
       UIImageWriteToSavedPhotosAlbum(image,
                                      self,
                                      @selector(image:finishedSavingWithError:contextInfo:),
                                      nil);
     }
     else if ([mediaType isEqualToString:(NSString *)kUTTypeMovie])
     {
      // Code here to support video if enabled
     }
    }
    
    -(void)image:(UIImage *)image
    finishedSavingWithError:(NSError *)error
     contextInfo:(void *)contextInfo
    {
     if (error) {
      UIAlertView *alert = [[UIAlertView alloc]
                            initWithTitle: @"Save failed"
                            message: @"Failed to save image"\
                            delegate: nil
                            cancelButtonTitle:@"OK"
                            otherButtonTitles:nil];
      [alert show];
     }
    }
    

    Pick photo from camera and store it to ImageView and call save method to save it to camera roll.
    May this will help

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone ever run into this issue before? Sometimes the string displays, sometimes half
Has anyone ever had this happen? It appears to lock the browser up until
Has anyone had trouble ever trying to implement this? I can't figure out why
Has anyone ever heard of overriding too many classes in Java? Perhaps this issue
Has anyone ever tried sending emails using 1&1 smtp host? I tried the following?
Has anyone ever seen this? I don't how to expand on this. It's the
is it possible to use SQLite for a j2me application ? has anyone ever
I'm interested in using an AJAX extension, namely this textbox calendar control. Has anyone
Has anyone ever gotten this error or know what it relates to? I got
This might be the most embarrassing question I've ever had to ask anyone. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.