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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:06:04+00:00 2026-06-06T16:06:04+00:00

I need to get array of images that have to call from server and

  • 0

I need to get array of images that have to call from server and arrange that in an order.But while executing below code i can’t get it…Guidance please…

- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
{

NSURL *url = [NSArray arrayWithObjects:[NSURL URLWithString: 
                                        @"http://images.wikia.com/marvelmovies/images/5/5e/The-hulk-2003.jpg"],
              [NSURL URLWithString:@"http://cdn.gottabemobile.com/wp-content/uploads/2012/06/ios62.jpg"],
              [NSURL URLWithString:@"http://challenge.roadef.org/2012/img/google_logo.jpg"],
              [NSURL URLWithString:@"http://addyosmani.com/blog/wp-content/uploads/2012/03/Google-doodle-of-Richard-007.jpg"],
              [NSURL URLWithString:@"http://techcitement.com/admin/wp-content/uploads/2012/06/apple-vs-google_2.jpg"],
              [NSURL URLWithString:@"http://www.andymangels.com/images/IronMan_9_wallpaper.jpg"],
              [NSURL URLWithString:@"http://sequelnews.com/wp-content/uploads/2011/11/iphone_5.jpg"],Nil];

/*
int i=0;
int cord_x=0;
int cord_y=30;
int cont=0;

for (i = 0; i < [(NSArray*)url count]; i++) {
    cont=cont+1;
    if (cont > 3) {
        cord_x=0;
        cord_y=cord_y+110;
        cont=1;
    }*/

    UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:(NSURL*)[(NSArray*)url objectAtIndex:index]]]; 

    //cord_x=cord_x+110;



UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, 200.0f, 200.0f);

[button setImage:(UIImage*)[image objectAtIndex:index] forState:UIControlStateNormal]; 

[button addTarget:self action:@selector(buttonTapped:) forControlEvents:UIControlEventTouchUpInside];
return button;

}

//}

now i need to place button image and image from server…

  • 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-06T16:06:05+00:00Added an answer on June 6, 2026 at 4:06 pm
     int row = 0;
    int column = 0;
    
        for(int i = 0; i < url.count; ++i) {
        UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:(NSURL*)   [(NSArray*)url objectAtIndex:i]]]; 
    
        UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = CGRectMake(column*100+16, row*90, 80, 80);
        [button setImage:image forState:UIControlStateNormal]; 
    
        [button addTarget:self 
                   action:@selector(buttonClicked:) 
         forControlEvents:UIControlEventTouchUpInside];
        button.tag = i; 
        [self.view addSubview:button];
    
        if (column == 2) {
            column = 0;
            row++;
        } else {
            column++;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array of images that I create dialogs from. I need to
I have an array of images (can be up to 25) that need to
So I have an image that I need to call .width and .height but
I need to know how to get an array of bytes from a loaded
I desperately need to be able to get some information from the request array
I have a method that I call to make web service requests using GET.
I need to get string array or list with ajax and Action, this is
I am having trouble with this association. I need to get an array of
I'm using Marshal.dump to serialize an array of objects, I need to get the
I need get the id of an images which is place inside a datatemplate..

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.