Re: Weird crash on iOS
Re: Weird crash on iOS
- Subject: Re: Weird crash on iOS
- From: Laurent Daudelin <email@hidden>
- Date: Wed, 19 Sep 2012 08:29:45 -0700
On Sep 19, 2012, at 06:47, Glenn L. Austin <email@hidden> wrote:
> On Sep 19, 2012, at 1:17 AM, Laurent Daudelin <email@hidden> wrote:
>
>> I see what you mean. Well, I'm not trying to recreate a state machine. For example, I have a bunch of UITableViewCells that download content from a server, including images. When they are done, I want to refresh the table view because the pictures will not display. However, I don't want to reload the table view each time a cell has got its content, so, they send a message to the UITableViewController which then cancel any previous performAfterDelay that could be pending and then issue a performAfterDelay to reload the table view. So, if there is a delay of more than 3 seconds, the table view will reload, otherwise, it will keep pushing out the reload until most cells have received their contents. Of course, the content of the cells is partially visible as the text portion is quick to setup. It's the images attached to the cells that can take a variable amount of time.
>
>
> If you can avoid it (and you can), don't reload the entire table just to redraw a few cells -- just force those specific cells to redraw with reloadRowsAtIndexPaths:withRowAnimation:.
I tried using it but it would invariably crash. It would not be an assertion because the number of rows was changing (it was not since at the time of reloading the table view, all the content is there). I thought at some point that maybe this method was only to be used when adding or removing cells, as part of the beginUpdate and endUpdate of the table view, so I stopped using it.
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden