UIScrollview zoom and enable paging simultaneously?

Yes. You can do it. In each page of the mainScrollView add a subScrollView containing the imageView .

You need to do the following things.

Up vote 2 down vote favorite 2 share g+ share fb share tw.

Can I implement both the paging and zooming of imageview in a uiscrollview at the same time. Iphone ipad uiscrollview link|improve this question edited Jun 7 '11 at 4:04EmptyStack15.8k31236 asked Jun 7 '11 at 3:47Priyanka V7410 43% accept rate.

Yes. You can do it. In each page of the mainScrollView add a subScrollView containing the imageView.

You need to do the following things. Set maximumZoomScale for subScrollView subScrollView setMaximumZoomScale:2.0f; // You can set any value This value is calculated based on the size of the image displayed in the imageView. In the viewForZoomingInScrollView: method of the subScrollView return the imageView - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return imageView; } Enable paging in mainScrollView mainScrollView.

PagingEnabled = YES; You have to write further code to handle paging in the mainScrollView.

Can you explain it. If I am adding a scrollview on mainscrollview how can I implement paging on main scrollview. All the touches will go on to the subscrollview, right.

– Priyanka V Jun 7 '11 at 9:44 @user760321, If you scroll the subScrollView and if it reaches its end, the touch will be transferred to the mainScrollView. So the mainScrollView will move to next page if available. – EmptyStack Jun 7 '11 at 9:53 k.

Thank you. Its a good solution. – Priyanka V Jun 7 '11 at 9:59 @user760321, I have implemented this in one of my project.

Wish you luck on implementing this :-) – EmptyStack Jun 7 '11 at 10:00 I have implemented it. – Priyanka V Jun 7 '11 at 10:14.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions