Editing and Building Code

In a typical app, code is split across multiple files. We’ll look at the organization of the files later in this chapter and the next one. But with the exception of nib files, which were introduced in Chapter 4, all code files are text. You edit them by selecting a file in the Project navigator so that it appears in the Editor pane and typing text into it.

The Editor isn’t a conventional word processor. It’s designed for code editing, and it includes useful tools for highlighting errors as you type, and while the app is being tested, as shown in Figure 5.1. It also includes a feature called Code Completion that tries to guess what you’re trying to type, so it can fill in the rest of your typing for you to save time.

9781118462133-fg0501.tif

5.1 Error highlighting and code completion in the Xcode editor.

Get iOS App Development Portable Genius now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.