Re: UITableView -reloadData woes
Re: UITableView -reloadData woes
- Subject: Re: UITableView -reloadData woes
- From: Carl Hoefs <email@hidden>
- Date: Fri, 12 Feb 2016 16:33:39 -0800
On Feb 12, 2016, at 4:28 PM, Quincey Morris <email@hidden> wrote:
>
> On Feb 12, 2016, at 16:23 , Carl Hoefs <email@hidden <mailto: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.
Bingo! I didn't refresh the data model from the database, so it had stagnant data. Thanks for spotting this! It's been a long day. My boss is yelling at me, "There's a reason the sun goes down!"
Thanks a mil!
-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