Building the UI for the iOS app that will control an actuator
Click on Main.storyboard in the Project Navigator on the left-hand side of the Xcode window. The editor will switch to a design view that displays how the view will look. Click on View Controller under View Controller Scene. Make sure that you see the Utilities pane on the right-hand side and check the values for Identity Inspector. In order to do so, select View | Utilities | Show Identity Inspector or press Command + Option + 3. The value for Class will be ViewController under Custom Class, as shown in the following screenshot:
The previously introduced ViewController
class is the custom class associated with the View Controller tab in the main storyboard for the iOS app. We will add code to this class later.
Now, we want to add and connect a simple UI element that will allow us to easily turn on and turn off a motor, specifically, a UISwitch
instance. A switch displays an element that shows the Boolean state of a value. We...