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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:44:49+00:00 2026-05-17T20:44:49+00:00

HI all can anyone please refer me, the iphone image gallery source code? Any

  • 0

HI all
can anyone please refer me, the iphone image gallery source code?
Any link ,sample code will be great help.

i am trying to show some 70 to 100 images as thumbnails , and on selecting any image, it should give a full view of that image,i am trying to accomplish, whatever is in iphone’s picture gallery,
i thought, there must any sample code available.
suggestions are always appreciated

regards

  • 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-17T20:44:49+00:00Added an answer on May 17, 2026 at 8:44 pm

    In didload method call two methods to create scroll view and thumbnail button.Keep both thumbnail images and wallpaper images array in the same order.

    -(void)createScrollView
    {
    scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)];
    scrollView.pagingEnabled = YES;
    scrollView.showsHorizontalScrollIndicator = NO;
    scrollView.showsVerticalScrollIndicator = NO;
    scrollView.scrollsToTop = NO;
    scrollView.delegate = self;
    scrollView.contentSize = CGSizeMake(320 * (([imagesArray count]- 1) / 25 + 1), 440);
    
    scrollView.backgroundColor=[UIColor blackColor];
    [self.view addSubview:scrollView];
    
    }
    
     -(void)createButton{
    for (int i = 0; i < [imagesArray count]; i++) 
    {
    
        thumbNailButton = [UIButton buttonWithType:UIButtonTypeCustom];
        thumbNailButton.frame = CGRectMake(6 + 62 * (i % 5) + 320 * (i / 25), 5+65 * ((i / 5) % 5), 56,56);
    
        img = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 56, 56)];
        [img setImage:[UIImage imageNamed:[imagesArray objectAtIndex:i]]];
        thumbNailButton.tag=i;
        [thumbNailButton addTarget:self action:@selector(imageClicked:) forControlEvents:UIControlEventTouchUpInside];   
        [thumbNailButton addSubview:img];
        [scrollView addSubview:thumbNailButton];
    
    }
    
    }
    
     -(void)imageClicked:(id)sender{
    UIButton* button = (UIButton*)sender;
        AppDelegate *appDelegate=(AppDelegate *)[[UIApplication sharedApplication]delegate];
    [appDelegate setimageClickedValue:button.tag];
    
    LargeWallPaperviewController *largeWallPaperViewController=[[LargeWallPaperviewController alloc]initWithNibName:@"LargeWallPaperviewController" bundle:nil];
    [self.navigationController pushViewController:largeWallPaperViewController animated:YES];
    [largeWallPaperViewController release];
    }
    

    In largewallpaperviewcontroller class in didload method

       [imagesArray addObjectsFromArray:[NSArray arrayWithObjects:@"wallf1.jpg",@"wallf2.jpg",@"wallf3.jpg",@"wallf4.jpg",@"wallf5.jpg",@"wallf6.jpg",@"wallf7.jpg",nil]];
    
    scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)];
    scrollView.pagingEnabled = YES;
    scrollView.showsHorizontalScrollIndicator = NO;
    scrollView.showsVerticalScrollIndicator = NO;
    scrollView.scrollsToTop = NO;
    scrollView.delegate = self;
    scrollView.contentSize = CGSizeMake(320 * ([imagesArray count] ), 440);
    scrollView.backgroundColor = [UIColor blackColor];
    [self.view addSubview:scrollView];
    
    for (int i = 0; i < [imagesArray count]; i++) 
    {
    
        wallPaperButton=[UIButton buttonWithType:UIButtonTypeCustom];
        wallPaperButton.tag=i;
        wallPaperButton.frame=CGRectMake((320*i),0, 320, 325);
    
        UIImageView *img =[ [UIImageView alloc]initWithFrame:CGRectMake(0,0, 320, 325)];
    
        img.image=[UIImage imageNamed:[imagesArray objectAtIndex:i]];
        img.contentMode=UIViewContentModeScaleAspectFit;            
        [wallPaperButton addSubview:img];
        [img release];
    
    
        [wallPaperButton addTarget:self action:@selector(imageSelected:) forControlEvents:UIControlEventTouchUpInside];     [scrollView addSubview:wallPaperButton];
    }
    appDelegate=(AppDelegate *)[[UIApplication sharedApplication]delegate];
    int imageValue=[appDelegate getimageClickedValue];
    [scrollView scrollRectToVisible:CGRectMake(320*imageValue, 0, 320 , 440) animated:NO];
    

    i have used a button in the largewallpaer view.If you want you remove it and directly add it to image view.This code is working for me ,change it to your requirement.Its easy to understand.

    All the best.

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

Sidebar

Related Questions

All, Can anyone please tell me what scoping technique does Modula-3 employ? I found
Hey all, can anyone please explain how I can subclass UIButton and override some
Can anyone please suggest me any pointer to an iterative algorithm for insertion and
Does anyone know of a script that can select all text references to URLs
Does anyone know of a way i can extract all jpg images from a
Can anyone please explain the following HAVING clause from an Access database? How can
Can anyone please help me to work out how to achieve the following? I
Can anyone please recommend the best and easiest way to include multiple Javascript files
Can anyone please explain how this works #define maxMacro(a,b) ( (a) > (b) )
Can all .NET exception objects be serialized?

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.