Chapter    2

Getting Used to Xcode

In this chapter, I use Xcode to demonstrate the ways in which I present examples throughout this book. Playgrounds, which are one of the most useful features of Xcode 6, allow for code experiments to be created and evaluated without needing to create an application project. I use playgrounds to help describe the problems that patterns are intended to solve and use them to demonstrate simple implementations.

Many of the design patterns I describe in this book rely on restricting access to classes, methods, and properties. Swift supports access protection keywords, but they operate on a per-file basis. This is a problem for playgrounds because all the code is in a single file, and so access protections are not ...

Get Pro Design Patterns in Swift 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.