Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
- Subject: Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
- From: Matt Neuburg <email@hidden>
- Date: Sat, 18 Jun 2011 09:05:45 -0700
On Sun, 12 Jun 2011 14:30:42 +1000, Brian Bruinewoud <email@hidden> 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 = email@hidden, <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 (email@hidden)
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:
This email sent to email@hidden