Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Importing image from server and arrange it in a view
    primarykey
    data
    text
    <p>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...</p> <pre><code>- (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 &lt; [(NSArray*)url count]; i++) { cont=cont+1; if (cont &gt; 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; } //} </code></pre> <p>now i need to place button image and image from server...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload