Refactoring in Xcode

Refactoring is the disciplined practice of making small changes to a codebase that alters its internal structure without changing its perceived behavior. Xcode offers a handful of refactoring tools; the rest we’ll do by ourselves.

Where do we start? Well, we’ve sketched out our idea for using multiple view controllers, and once we’ve gone ahead and done that, the default name of our current ViewController is going to be a liability, since we might well ask, “Which view controller?” Let’s rename it to clear up any future confusion.

Renaming

What should we call it? Looking at its functionality, we could call this something like TweetListViewController. However, in navigation-based apps, we typically refer to the first view ...

Get iOS 8 SDK Development, 2nd Edition 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.