Re: why does UIScrollView call layoutSubviews every time it scrolls?
Re: why does UIScrollView call layoutSubviews every time it scrolls?
- Subject: Re: why does UIScrollView call layoutSubviews every time it scrolls?
- From: David Duncan <email@hidden>
- Date: Tue, 8 Feb 2011 09:15:44 -0800
On Feb 8, 2011, at 8:15 AM, Roland King wrote:
> I can't see why UIScrollView would call layoutSubviews every time it scrolls, I expected that it would call layoutSubviews once only when its geometry changes (or you ask it to) and after that would just scroll its contained view quietly.
Technically scrolling is a geometry change, since it is accomplished by changing the layer's bounds.origin (basically the change is coming from Core Animation). If your layout is expensive, it is likely that you will need to maintain a separate "layout is dirty" flag to avoid this.
--
David Duncan
_______________________________________________
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