When Xcode is started, the welcome screen is displayed with various options, including the ability to create a playground. The welcome screen can be shown with Command + Shift + 1, or by navigating to Window | Welcome to Xcode:
Using either the Xcode welcome screen (which can be opened by navigating to Window | Welcome to Xcode) or by navigating to File | New | Playground, create MyPlayground
in a suitable location targeting iOS. Creating the playground on the Desktop
will allow easy access to testing Swift code, but it can be located anywhere on the filesystem.
Playgrounds can be targeted either towards OS X applications or towards iOS applications. This can be configured when the playground is created, or by switching to the Utilities view by navigating to View | Utilities | Show File Inspector or pressing Command + Option + 1 and changing the dropdown from OS X to iOS or vice versa: