On Sun, 12 Jun 2011 14:30:42 +1000, Brian Bruinewoud <br...@darknova.com> said: >Hi All, > >I have an app that consists of a scroll view subclass which contains a single >subview. In the scroll view subclass I override layoutSubviews based on Apple >sample code (see below). The intention of layoutSubviews is to centre the >subview in the scrollview when the subview is smaller than the scrollview's >display area. > >There are three circumstances where the layoutSubviews is called but in one of >them the visual results are incorrect.
Funny you should mention this, since I was just experimenting with the same issue. What I ended up doing is setting the contentOffset explicitly after the zoomScale changes. https://github.com/mattneub/Programming-iOS-4-Book-Examples/tree/master/p492zoomCentered m. -- matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ 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