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

  • Home
  • SEARCH
  • 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 8151423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:23:03+00:00 2026-06-06T15:23:03+00:00

I have to display images from the Photo Library using UIScrollview. Except the first

  • 0

I have to display images from the Photo Library using UIScrollview. Except the first image all the rest are not selected during runtime. To view them one has to scroll to the selected image. How do I view the image that I select instead of starting from the first image itself ? Thank you.

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
UIImage *img = [info valueForKey: @"UIImagePickerControllerOriginalImage"];
[imagearray addObject:img];
[self dismissModalViewControllerAnimated:YES];
for (int i =0; i<[imagearray count]; i++) 
{ 
   CGFloat yOrigin = i * self.view.frame.size.width;
   image = [[UIImageView alloc] initWithFrame:CGRectMake(yOrigin, 0, self.view.frame.size.width, self.view.frame.size.height)];
   [image setImage:[imagearray objectAtIndex:i]];
   [image setUserInteractionEnabled:YES];
   [scrollView1 addSubview:image];
   scrollView1.contentSize = CGSizeMake(self.view.frame.size.width * [imagearray count], 350.0);}
  • 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-06T15:23:06+00:00Added an answer on June 6, 2026 at 3:23 pm

    You should assign proper value to contentOffset property.
    Its the point from where scrollView will become visible. By default, it is at Origin. But you can set it at the point from where you want to display your scrollView.

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

Sidebar

Related Questions

I had developed an application in which I have to display images from specific
I have a Rails 3 application that needs to display images from another application.
I'm trying to display image data read in from a binary file (I have
I'm trying to create thumbnails (288x288) of selected photos from iPad photo library. I
I need to take some images from the iPhone / iPad photo library from
I have my code written to select images from my database and display them,
I have an App that downloads and displays images from URL's. This works fine
I have code that reloads images via HTTP from the main thread and displays
I have a sample RSS from Amazon. While the RSS displays correctly with images
i have a jsf page which displays an image from an url http://ichart.finance.yahoo.com/z?s=^NSEI&t=1d&q=l&l=on&z=l&p=s&a=v&p=s i

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.