What is actually changing when we zoom out a subView inside a UIScrollView?

If you are not manually responding to changes in the zoom scale (like I describe in this answer ), the view that you return from the -viewForZoomingInScrollView: delegate method is simply having a scaling transform applied to it by the UIScrollView. The frame size of the view is not changing, it is just being graphically transformed (which is why you see blurriness at higher scale factors).

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

I have a subview inside a uiscrollview. Then I zoom it out. So it becomes bigger and allows me to scroll through it.

So what is actually changing here? ContentSize of UIScrollView? Iphone uiscrollview link|improve this question asked Mar 8 '10 at 11:58wolverine331620 75% accept rate.

If you are not manually responding to changes in the zoom scale (like I describe in this answer), the view that you return from the -viewForZoomingInScrollView: delegate method is simply having a scaling transform applied to it by the UIScrollView. The frame size of the view is not changing, it is just being graphically transformed (which is why you see blurriness at higher scale factors).

Ok, I understand. I understand why even after the drawrect is being called, the content is not getting refreshed for the subview and remains blurry as it was earlier. So can you suggest a way by which I will be able to adjust my content to this new enlarged size?

– wolverine Mar 9 '10 at 5:08 1 @wolverine: If you look at the answer I link to above, I describe a process for responding to changes in the scale factor within a UIScrollView. You will need to have your view redraw itself at the end of the scaling operation by changing the frame, calling -setNeedsDisplay, or doing some other custom Quartz drawing within your view. – Brad Larson Mar 9 '10 at 17:31.

The content size of the scrollview remains logically the same. If you check the frame of the scroll view it remains the same. I think all that is changing is the scaling of the CGLayers.

When you zoom in, it shrinks the clipping region frame smaller but then scales the CGLayer transform upwards. In other words, all the logical elements are still present it is simply choosing to draw and display a different part of it. In the iPhone Application Programming Guide they have a good explanation about the relationship between frames, clipping regions and various transforms on views.

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