• 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: Quincey Morris <email@hidden>
  • Date: Fri, 12 Feb 2016 16:28:20 -0800
  • Feedback-id: 167118m:167118agrif8a:167118sTX3fmVei_:SMTPCORP

On Feb 12, 2016, at 16:23 , Carl Hoefs <email@hidden> wrote:
>
> When I issue the -reloadData, the -tableView:numberOfRowsInSection: callback gets invoked. But, it returns the number of rows _before_ the addition.

Whoa. *You* return the number of rows from *your* data model, which you presumably updated just before calling reloadData. If you’re returning the old number of rows, you’re doing something wrong.

Also note Michael Swan’s excellent warning, to ensure that you’re calling reloadData on the main thread.

_______________________________________________

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


  • Follow-Ups:
    • Re: UITableView -reloadData woes
      • From: Carl Hoefs <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: Datasource methods in view-based tables
  • Next by Date: Re: Cocoa-dev Digest, Vol 13, Issue 82
  • Previous by thread: Re: UITableView -reloadData woes
  • Next by thread: Re: UITableView -reloadData woes
  • Index(es):
    • Date
    • Thread