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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:01:22+00:00 2026-06-17T07:01:22+00:00

I am using UIGridView Repo to create a grid view of images from a

  • 0

I am using UIGridView Repo to create a grid view of images from a feed. But when I am using the following code I get the same image filling all the grid.

-(UIGridViewCell *) gridView:(UIGridView *)grid cellForRowAt:(int)rowIndex AndColumnAt:(int)columnIndex
{
Cell *cell = (Cell *)[grid dequeueReusableCell];

if (cell == nil) {
    cell = [[Cell alloc] init];
}


NSString *imageLink = [item objectForKey:@"link"];

NSURL * imageURL = [NSURL URLWithString:imageLink];
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage * image = [UIImage imageWithData:imageData];

cell.thumbnail.image = image;
return cell;
}

How can I fill the grid with all the images from the array?

Thanks in advance

  • 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-17T07:01:23+00:00Added an answer on June 17, 2026 at 7:01 am

    In your gridView's cellForRowAt method you are using same image link for all UIGridViewCell.

    Get different link from feed and depending on rowIndex and column index use different image

    EDIT : For example i assume u have 4 images in row

     int column = 4;
     int row = totalImage / column;
    
     for(int i=1; i<=totalImage; i++)
     {
        for(int j=1; j<=row; j++)
        {
           for(int m=1; m<=column; m++)
           {
              // j and m 's image
           }
        }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Android NDK is it possible (from native C-code) to get a list of
Using jQuery, how do I get the value from a textbox and then load
Using this code, the following execution yields strange results: C 100 R W The
Using the DateTime class, if I try to run the following code: $mydate =
Using JQuery,Is there any possible to capture images/scanned documents from digital Camera/Scanner Connected to
Using CSS, how can I create a partial border as per image below I
Using C#, I want to show the image in the Access column but failed
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using MongoDB C# Driver (official form 10gen), I'm doing the following code: using (database.RequestStart())
using phpPgAdmin, I've tried to create a table in my database. But am getting

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.