On May 13, 2009, at 11:45 AM, Eric E. Dolecki wrote:
So is it safe to approach threads like they were timers? You start a
thread, and it calls back to it's selector method when it's complete
(detachNewThreadSelector:toTarget:withObject)?
I would conclude my thread with a line like:
[myCell performSelectorOnMainThread:@selector(setImage:)
withObject:myImage waitUntilDone:YES];
That should set your cell's image to the image you just downloaded.
Now - what if a thread completes and the cell is currently out of
view (it was scrolled) - do the internals take care of that, or
could it cause an error?
I wouldn't worry about setting cells to images that are out of view.
An implementation that waits for cells to come back into view would be
tedious and probably unnecessary.
Luke
_______________________________________________
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