1.2. Understanding Interface Builder
Problem
You want to start designing a user interface for your iOS apps but don’t want to waste time coding.
Solution
Use Interface Builder.
Discussion
Interface Builder, or IB, is integrated into Xcode as a tool for creating a user interface for your Mac and iOS apps. IB manipulates .xib files, which are sometimes called nib files to reflect the file extension they had in past Apple products. A nib file is basically the compiled (binary) version of an XIB file which itself is an XML file that is managed by IB. XIB files are in XML format to make them easier to use with version control systems and text-based tools.
Let’s go ahead and start using IB. To do this, first create an iOS App using the Single View Application iOS Project template in Xcode. Follow the instructions in Recipe 1.1, but instead of Page-Based Application template (Figure 1-1), use the Single View Application template and follow it to the last dialog to save your project to disk. I’ve named the project Understanding Interface Builder.
Note
Make sure your app is a Universal app, as shown in Figure 1-2.
After your project is created, the first thing you need to do is make sure it is going to run on iPhone Simulator, as shown in Figure 1-6.

Figure 1-6. Choosing to run your app on iPhone Simulator
Now press Command+Shift+R to run your application. You will then see the iOS Simulator showing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access