Under the hood of a storyboard

Despite the fancy graphics, and the ever-expanding list of tools to help us make the most of storyboards (and Interface Builder in general), the fact remains that the UI of an app is just a heap of XML:

  1. To prove it, create a new project, ticking Use Storyboards, obviously.
  2. Navigate to the Main.storyboard file.
  3. Control + click on that file and select Open As | Source Code from the contextual menu.

The file I'm looking at is just short of seven hundred lines of XML. Now, nobody is going to suggest we want to create storyboards by typing that much code. But it really is worth reading through it, to see just how much work we can do at this level.

We can rapidly scroll through, for example, menu items, changing ...

Get Mastering macOS Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.