Displaying the fridge's status
Once we are able to add stuff to our fridge, we need to create another scene to display the current fridge's status. In this scene, we are going to use UIProgressView
because it is more visual than just writing a number on a label.
Go back to the storyboard and add a new view controller to it. Drag five labels, two buttons, and three progress views to the scene as follows.
Place the first label at the top and set its title to
Fridge Status
.Place the second label under the first one without a title or, if you prefer, you can just add a dash to locate it easily. This label will be used to report to the user the supplies that are running out of stock.
Under the message label, place one button and set its title to
Go to the supermarket
.You can place the other three labels with a progress view under each one. Set the labels' title to
Drink
,Food
, andDessert
.Lastly, place the second button at the bottom of the scene and set its title to Back.
In the end, you should...