Lecture 9: Data Flow

Lecture 9 of Stanford’s iOS Development course from Spring 2020 covers the basics of data flow, including Publishers and Bindings. These mechanisms allow for formalized references to the “truth” of data rather than requiring it to be replicated which can be error-prone. A basic explanation of property wrappers helps clarify what @ObservedObject, @EnvironmentObject, @Published, @State, @Binding, etc. are all about. The demo shows publishing the arrival of the background image for our EmojiArt document as well as auto-saving the document when changes are noticed (i.e. published). Finally, our UI is enhanced to let us choose from multiple palettes of emoji where a Binding is used to link our new palette chooser to our main EmojiArt UI.


Leave a Comment

We don't require your email address, or your name, for anyone to leave a comment. If you do add an email address, you may be notified if there are replies to your comment - we won't use it for any other purpose. Please make respectful comments, which add value, and avoid personal attacks on others. Links are not allowed in comments - 99% of spam comments, attempt to post links. Please describe where people may find additional information - for example "visit the UN website" or "search Google for..." rather than posting a link. Comments failing to adhere to these guidelines will not be published.