Re: iPhone: load cell from XIB slows down tableview?
Re: iPhone: load cell from XIB slows down tableview?
- Subject: Re: iPhone: load cell from XIB slows down tableview?
- From: John Michael Zorko <email@hidden>
- Date: Mon, 04 Jan 2010 07:58:44 -0800
Tony,
Have you verified that you've set the Identifier for the custom cell
in the XIB to match the above cellID? If they don't match, you'll
end up loading the XIB for every row in the table view. If things
are set up properly, the XIB will be loaded once for each visible
row on the screen plus a few more depending on how fast you scroll.
I fixed the issue last night, perhaps 20 minutes after I posted the
question. Yes, it was exactly as you described -- I had the ID set
incorrectly in the XIB. Many thanks!
This is less of an issue, but iterating over the objects in the XIB
can be avoided by adding an outlet connected to the custom cell to
your class that owns the XIB. I've got a sample project that
demonstrates this available at
http://majestysoftware.com/code/CustomCellFromNib.zip
The project was created pre-3.0, so you'll get a deprecation warning
when building. The basic concept is still valid in 3.x.
That is a good idea -- i'll try it :-)
Regards,
John
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
_______________________________________________
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