i am newbie in iOS Development. I know this Question asked more times but i not get Answer for it. Here i add my image in to one UIImageview and Then add this UIImageView into UIScrollView i write a code for this like as
for(index=0; index < [self.imagesa count]; index++)
{
NSDictionary *dict=[self.imagesa objectAtIndex:index];
NSString *image=[dict valueForKey:@"link"];
bigImage=[[UIImageView alloc]init];
bigImage.userInteractionEnabled=TRUE;
bigImage.tag=123;
bigImage.tag=index;
bigImage.bounds=CGRectMake(0, 0, self.zoomScroll.frame.size.width, self.zoomScroll.frame.size.height);
bigImage.frame=CGRectMake(index * self.zoomScroll.frame.size.width, 0, self.zoomScroll.frame.size.width, self.zoomScroll.frame.size.height);
[self.zoomScroll addSubview:bigImage];
[bigImage setMultipleTouchEnabled:YES];
[bigImage sd_setImageWithURL:[NSURL URLWithString:image] placeholderImage:[UIImage imageNamed:@"1.png"]];
[bigImage setUserInteractionEnabled:TRUE];
[self.objectarray insertObject:bigImage 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.objectarray objectAtIndex:index]];
self.zoomScroll.scrollEnabled=YES;
self.zoomScroll.clipsToBounds=YES;
and i write a ViewforzoomInScrollview like as
-(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
return bigImage;
}
Here my Scrollview Contain all images but when i Zoom then it Zoom only First image and After Zoomed Scrollview Size is Set as Fixed and it is not Scroll. Here i set all Property delegate of Scrollview like as MaximumZoomScale,MinimumZoomScale but it is Not Zoom Curreent image in Scrollview it Zoom Always First Image of Imageview please give me Solution for that.