The iOS app
As it was mentioned before, this app will also be developed for iOS. The iOS app has two options:
The first one is to add supplies to your fridge
The second one is to check its current state
Inside the current state option, there will be another scene that will show us a map with the directions to the supermarket.
Rename the ViewController.swift
file to InitialViewController.swift
. Then, click on it and also rename its class to InitialViewController
. Now, click on the storyboard and update the view controller class.
Drag one label and two buttons to the scene. Set the label title to Fridge Control
, one button title to Add supplies
, and the other one to Check Status
. Don't forget to add the auto layout constraints that you think are necessary. The final result should be a simple layout similar to the following screenshot:
Go to its Swift file and add a method that will allow the other scenes to unwind to the main scene, which is a concept we've already seen in the previous chapters...