Beginning Firebase - Part 9: Updating and Deleting | Ray Wenderlich

Nothing lasts forever. Especially data. In this video, you'll learn how to update data, but also, how to delete it.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4203-beginning-firebase/lessons/9

I must admit, I was a bit confused here as to why you would comment out the checkbox accessory toggle and update the name value to bacon.
Should there not have been a challenge at the end of this tutorial to add updating the firebase data based on the current completed state after tapping on the cell.
You gave us all the code we need when changing the name to “bacon”

I just added the following:

let values: [String: Any] = ["completed": toggledCompletion]
groceryItem.ref?.updateChildValues(values)

just before tableView.reloadData() in the didSelectRowAt function and now my list toggles back and forth and updates the firebase database.

Am I missing something that is to come regarding this functionality?

This topic was automatically closed after 166 days. New replies are no longer allowed.