O'Reilly logo
  • Benjamin Melki thinks this is interesting:

Indeed, if you’re calling presentViewController:animated:completion: explicitly like this, you might even give your SecondViewController a designated initializer that accepts — and thus requires — this data. In my Latin vocabulary app, for example, I’ve given DrillViewController a designated initializer init(data:) precisely so that whoever creates it must pass it the data it will need to do its job while it exists.

Passing information back from the presented view controller to the original presenter is a more interesting problem. The presented view controller will need to know who the original presenter ...


Cover of Programming iOS 8


pass information between view controllers