Re: UITableView -reloadData woes
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