On Wed, 24 Nov 2010 12:04:26 +0100, macli...@batchmaker.de (Hado Hein) said:
>But when the picture is zoomed to a size smaller than the ScrollView the
>picture is placed in the top left corner and no more scrolling happens.
>In simple I want to center the small ImageView in the bigger ScrollView
>so that there is still scrolling possible.

Scrolling is possible if the contentSize is larger than the scroll view. If the 
image view is the scalable view (for zooming purposes), then if it is zoomed 
smaller than the scroll view, no scrolling is possible. I think you're going to 
want to embed the image view in a superview, make the superview the scalable 
view, and adjust the size and position of the image view within that superview 
yourself. It is possible also to trick the scroll view by removing the 
transform of the scalable view, but in that case you break the scroll view's 
idea of how zoomed the content is, so you have to give it new maximum-minimum 
zoom values to compensate and track the "real" zoom value yourself. m.

--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to