Book Image

Xcode 6 Essentials

By : Jayant Varma
Book Image

Xcode 6 Essentials

By: Jayant Varma

Overview of this book

<p>Apple made their iOS devices easy to use and now they have extended that to their development tools such as Xcode. In Xcode, you can create native applications in the easiest way. Apple's new Xcode technology is making the development curve smoother with its easy-to-develop features and enhancements.</p> <p>Xcode can now write code with the performance-upgraded, brand new, innovative language called Swift, so you no longer need to rely on third-party frameworks to create applications.</p> <p>The book gives you a tour of the new features of Xcode 6. It introduces some important aspects such as the Swift language and its Playgrounds with visual live coding, creating interfaces, storyboards, controllers, frameworks, and live previews. Diving more into the subject, this books shows you how to debug your code, and how to build and test the application on a device or the simulator.</p>
Table of Contents (15 chapters)

Introducing Interface Builder


Interface Builder has now been a part of Xcode for a while and can be used as you can use the code editor. Create a new project with a storyboard to create a simple UI. To start, create a new project (File | New | Project) and create an iOS project:

Creating a basic interface

To work with the storyboard UI, first click on the Main.storyboard option to open the storyboard in the editor for you to work with. This area is called the canvas; this is where you drag-and-drop your elements:

Now you can place items onto the canvas. You can drag-and-drop elements from the library, scroll down to a button object, and drag and drop it onto the canvas. Use the blue guidelines to align it right at the center of the view.

Elements on the view

On top of the scene, there are three icons: the first yellow and the next two orange. These are the View Controller, First Responder, and Exit as can be seen in the following screenshot:

The following is the description of the three icons...