17.4 The Preview Canvas
The preview canvas provides both a visual representation of the user interface design and a tool for adding and modifying views within the layout design. The canvas may also be used to perform live testing of the running app without the need to launch an iOS simulator. Figure 17-8 illustrates a typical preview canvas for a newly created project:
Figure 17-8
If the canvas is not visible it can be displayed using the Xcode Editor -> Canvas menu option.
The main canvas area (A) represents the current view as it will appear when running on a physical device. When changes are made to the code in the editor, those changes are reflected within the preview canvas. To avoid continually updating the canvas, and depending on the nature of the changes being made, the preview will occasionally pause live updates. When this happens, the Resume button will appear in the top right-hand corner of the preview panel which, when clicked, will once again begin updating...