Better way to explain passing of data?


Just a thought for the 4th edition.

As I was consuming the data presented in “Passing data between view controllers” on pgs: 231 & 232, I had to read it over a couple of times to realize what was going on.

If I had understood “didSelectRowAtIndexPath” first, where the pointer is given to the selectedItem, it would have made “viewWillAppear” make more sense.

Talking about passing the data in viewWillAppear before explaining where the data comes from (selectedItem pointer) makes it harder to understand.

I think in terms of what I would see if I were stepping through the debugger, and “didSelectRowAtIndexPath” would happen first before the “viewWillAppear” message is sent.

I’d suggest flipping those two paragraphs in the 4th edition. (and anywhere else the “timing” of messages is reversed if at all possible)