Information Technology Reference
In-Depth Information
If you're getting started with Xcode, it's a good idea to spend enough time practicing with this feature to make it
second nature. Although you can use the arrow keys to move between parameters, this tab-type-skip feature is a
significant timesaver.
Using auto-indentation
Auto-indentation works as you'd expect, moving the cursor to the correct horizontal location in the code. It's
smart enough to keep track of nest brackets and other features. If you auto-indent a line and the cursor doesn't
appear where you expect it to, it's likely there's a missing bracket on a preceding line. This is a useful feature,
not a bug. You can indent with spaces or tab characters and select the number of indentation spaces using the
File Information area introduced earlier in this chapter.
Using the Structure pop-up menu
Select a few of lines of code inside a method, right-click, and select Structure from the menu that appears, as
shown in Figure 4.22. This menu has some extremely useful features. You can move the code left or right as a
single block manually, re-indent it automatically to its ideal indentation level, or convert it into a comment.
FIGURE 4.22
Use the Structure pop-up menu; it's a powerful timesaver.
Search WWH ::




Custom Search