• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UITableView -reloadData woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UITableView -reloadData woes


  • Subject: Re: UITableView -reloadData woes
  • From: email@hidden
  • Date: Sat, 13 Feb 2016 07:57:54 +0100
  • Importance: Normal

Have you tested the sequence in which these events occur? Does the
reallocate method return before the data model has been updated (or its
updating has completed?). Just log when the reloadData method starts and
log when updating the data model finishes. Maybe the latter happens later
than the former? Even though in code that should not be happening? If so,
try deferring the reloadData method call with 0.25 or .3 seconds and see
what happens.

I came across a didRotateNotification that has a similar issues and where
I expected it to call the method that updates the interface when rotating
completely finished. Instead, the interface was updated just a tiny bit
too quickly. So, for completeness' sake, try looking at the sequence in
time...




>
>> On Feb 12, 2016, at 1:39 PM, Quincey Morris
>> <email@hidden> wrote:
>>
>> I think the one thing you can count on is that the ‘reloadData’ API
>> isn’t broken.
>
> But it's very tempting to think so... ;-)
>
> When I issue the -reloadData, the -tableView:numberOfRowsInSection:
> callback gets invoked. But, it returns the number of rows _before_ the
> addition. If I return from that view controller and then go back into it,
> it has the correct number. It's behaving like there's something blocking
> the -reloadData operation.
>
> Perhaps -reloadData is sensitive to where it is called from? My context is
> that I have a table of users, the 0th element of which segues modally to a
> new VC to add a new user, then returns. Then in the original VC's
> -viewWillAppear: I issue the -reloadData. Should I instead do this from
> within the "add new user" VC? Or is there some other iOS pattern to do
> this?
>
> -Carl
>
>
> _______________________________________________
>
> 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

_______________________________________________

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


References: 
 >UITableView -reloadData woes (From: Carl Hoefs <email@hidden>)
 >Re: UITableView -reloadData woes (From: Quincey Morris <email@hidden>)
 >Re: UITableView -reloadData woes (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Don't you hate it when Appkit crashes?
  • Next by Date: Re: Don't you hate it when Appkit crashes?
  • Previous by thread: Re: UITableView -reloadData woes
  • Next by thread: 'unowned' cannot be applied to non-class type
  • Index(es):
    • Date
    • Thread