i am newbie in iOS Development i want to add a image array in to UIScrollView when i write a code for that then it display only last image of array in to UIScrollview.i not understand what is problem please give me Solution
I write a code for that
for(int index=0; index < [self.imagesa count]; index++)
{
NSDictionary *dict=[self.imagesa objectAtIndex:index];
NSString *image=[dict valueForKey:@"link"];
self.zoomImage.bounds=CGRectMake(0, 0, self.zoomScroll.frame.size.width +10.0f, self.zoomScroll.frame.size.height);
self.zoomImage.frame=CGRectMake(index * self.zoomScroll.frame.size.width, 0, self.zoomScroll.frame.size.width, self.zoomScroll.frame.size.height);
[self.zoomImage setUserInteractionEnabled:YES];
[self.zoomImage setMultipleTouchEnabled:YES];
[self.zoomImage sd_setImageWithURL:[NSURL URLWithString:image] placeholderImage:[UIImage imageNamed:@"1.png"]];
[self.zoomImage setUserInteractionEnabled:TRUE];
[self.objectarray insertObject:self.zoomImage atIndex:index];
CGSize scrollViewSize=CGSizeMake(self.zoomScroll.frame.size.width*[self.objectarray count], self.zoomScroll.frame.size.height);
[self.zoomScroll setContentSize:scrollViewSize];
[self.zoomScroll addSubview:self.zoomImage];
[self.zoomScroll addSubview:[self.objectarray objectAtIndex:index]];
}
and when i make a local imageview then it was display for that code is this link shows my old code it is working but when i write a code for this it Display only Last array image please give me Solution for that. i know this question asked many times but i not get solution.