CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
In order to update the values of the open parking spots on the screen, you need a
reference of the Open Parking Spots: 0 label in your ViewController.swift file. Xcode
provides a very easy way to do this, as shown in Figure 7-28. You simply drag and drop the
label from the storyboard on the ViewController.swift file. Make sure you keep the Ctrl
button on the keyboard pressed.
Figure 7-28. Drag and drop label from storyboard
Figure 7-29. Outlet properties
When you drop the label on the code, Xcode will display a popup to enter the
name of this property. As shown in Figure 7-29 , enter a name and make sure you leave
Connection set to Outlet. Click Connect to add a new property to ViewController.swift.