i make an app that Contain UIScrollview with imageview my imageview Contain Array Image when i Press Zoom Button then i extended my UiScrollView Size and My Imageview Size then the only Last array image Size was Extended and it Was Overlaping on my First Image I want to make when Zoom Button Pressed then all my image is Zoomed and Not Overlaped each other i write a code for that like as
as initial Size
self.zoomScroll.frame=CGRectMake(10, 45, 300, 270);
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);
when ZoomButton was Pressed
-(IBAction)zoombuttonpressed:(id)sender
{
self.zoomScroll.frame=CGRectMake(10, 40, 300, 400);
bigImage.frame=CGRectMake(10, 40, 300, 400);
[self.zoomScroll addSubview:bigImage];
}
Here zoomScroll is UIScrollview and bigImage is my UIImageView. then it was Zoom only Last image and it is overlapped in my first image of ImageView please Give me Solution for that.
Here when i modified Code like as
-(IBAction)zoombuttonpressed:(id)sender
{
self.zoomScroll.frame=CGRectMake(10, 40, 300, 400);
for(int index=0; index < [self.imagesa count]; 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];
then overlapping issue was solved but my Array only last image was Zoomed means extended it's size and other are remanning as initial size please give me Solution for that.
i know this Question are asked more times but i confused about this because not get Solution.