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 7682041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:28:34+00:00 2026-05-31T18:28:34+00:00

I know how to let user select an image from UIImagePickerController, but I don’t

  • 0

I know how to let user select an image from UIImagePickerController, but I don’t want that.
I just want to have NSArray of images stored in the phone, but I don’t want to involve user (to select a one and then have that image…),rather, I have created my own custom Image selector controller and want to have source as the gallary.

  • 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-05-31T18:28:35+00:00Added an answer on May 31, 2026 at 6:28 pm

    You can easily do that using the AVFoundation and AssetsLibrary framework. Here is the code to access all the photos:

    -(void)addPhoto:(ALAssetRepresentation *)asset
    {
        //NSLog(@"Adding photo!");
        [photos addObject:asset];
    }
    
    -(void)loadPhotos
    {
        photos = [[NSMutableArray alloc] init];    
        library = [[ALAssetsLibrary alloc] init];    
    
        // Enumerate just the photos and videos group by using ALAssetsGroupSavedPhotos.
        if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
        {
            [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) 
            {        
                 // Within the group enumeration block, filter if necessary
                 [group setAssetsFilter:[ALAssetsFilter allPhotos]];           
                 [group enumerateAssetsUsingBlock:^(ALAsset *alAsset, NSUInteger index, BOOL *innerStop)
                  {                                 
                      // The end of the enumeration is signaled by asset == nil.            
                      if (alAsset)
                      {
                          ALAssetRepresentation *representation = [alAsset defaultRepresentation];                      
                          [self addPhoto:representation];                      
                      }       
                      else
                      {
                          NSLog(@"Done! Count = %d", photos.count);
                          //Do something awesome
                      }
                  }];
             }
             failureBlock: ^(NSError *error) {
             // Typically you should handle an error more gracefully than this.
             NSLog(@"No groups");                                 
             }];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know UIImagePickerController can only select one image from library each time. When user
I am attempting to let the user select an image from the gallery on
I have a menu that let's a user select a country. Exactly like that
I know this will let the user retrieve the latest 10 posts from cocacola
I want to let the user select one row to use to submit the
I am developing a chatting/messaging app and I want to let the user select
Does Octave have a good way to let the user select an input file?
I know I can use PSMultiValueSpecifier to let user to choose a value from
Please let me know if you have any idea about it. Thanks EDIT What
Please let me know how to get the client IP address, I have tried

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.