Adding a Splash of Code
Wondering where the code is? As it stands, our recipe application is fully functional. We can run it without any actual code on our part and start inputting recipes immediately. The combination of Cocoa and Core Data makes it possible for us to produce this application with no custom code. However, we’re not stopping there.
Displaying a Picture of the Recipe
Since our iOS counterpart is capable of taking and displaying pictures, it seems only fair that the desktop variant should be able to add and display images. Fortunately, from the UI point of view, this functionality is an easy addition. Drag an NSImageView (aka Image Well) onto our window, and connect its Value Path setting to the imagePath of the recipe’s NSArrayController ...
Get Core Data in Swift now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.