Beginning Table Views · Passing Data in Segues | Ray Wenderlich

This is a companion discussion topic for the original entry at
1 Like

Hi! If the segue is initiated from the detail disclosure icon then why is the sender in prepare for segue is cast as an instance of tableview cell.

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]

Why is the title and text for the edit feature done in the ViewDidLoad? Why and when do we put code there? Why didn’t this go in the segue? Thanks!

Also, some feedback: Great videos. It would be a lot easier to understand if, when having long if/if let nested statements, to go a little slower and explain why each part is in each bracket (there was a misplaced “if let” in this video that was changed after a compiler error, and it took me a while to figure out myself why that was the case. In the video it was just quicky glossed over.)


1 Like

Why did we have to add addItemViewController.todolist = todoList to the if segue.identifier == “AddItemSegue”. It was just typed out and never explained. And my app runs the same with and without it (it seems).

Hey there - That’s an excellent question. It should have been discussed. You’re passing in the todolist because you’ll be using it in a later video. Essentially, you’ll use it to create new todolist items. For the moment, you don’t need it. This step should have been performed later in the series.