Re: [iPhone] Why so many calls?
Re: [iPhone] Why so many calls?
- Subject: Re: [iPhone] Why so many calls?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 27 Oct 2009 20:42:17 -0700
On Tue, Oct 27, 2009 at 5:22 PM, Phil Curry <email@hidden> wrote:
> Seems like an incredible waste of effort. Just curious if anyone knows why
> this happens. If you don't know why, just say so.
I don't work for Apple, and have never seen the UITableView source
code. So in the strictest sense I can't "really" know the answer.
But the same thing happens on the desktop side with NSTableView: there
are certain methods that are called very frequently, because
NSTableView doesn't hold on to any of the information you give it.
[1] Therefore, every time it needs to draw a string, it needs to get
that string from the delegate, lest the correct value has changed in
the interim.
Short version: it's a common pattern with delegates. "Deal with it"
is pretty much all you can do.
--Kyle Sluder
[1] As Corbin has pointed out before, this isn't entirely accurate.
NSTableView does cache some information here and there, but it would
be an incredible waste to cache your entire dataset.
_______________________________________________
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