You are previewing Xcode 6 Essentials.
O'Reilly logo
Xcode 6 Essentials

Book Description

Create exciting native apps for your Apple devices with Xcode

In Detail

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.

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.

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.

What You Will Learn

  • Create a complete project using Xcode and build native apps for Apple devices

  • Learn the basics of Swift, get started with coding, and program your own app quickly

  • Learn to design your UI in the storyboard rather than recreating it in a mockup tool and importing it to Xcode

  • Discover the basics of creating a custom control with live previews in Interface Builder

  • Migrate your custom code into frameworks

  • Get familiar with debugging and troubleshooting your code

  • Package your code and build for the App Store

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Xcode 6 Essentials
      1. Table of Contents
      2. Xcode 6 Essentials
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Introduction to Xcode
        1. Requirements and installing Xcode
        2. Features of Xcode
        3. What's new in Xcode 6?
          1. Interactive coding using Playgrounds
          2. Mac OS X storyboards
          3. Live design and responsive UI
          4. Visual debugging
          5. Improved debugger
        4. Summary
      9. 2. Tour of Xcode
        1. Starting Xcode
        2. Creating a new project
          1. Selecting the project type
          2. Setting the project options
          3. Setting the project properties
        3. Xcode overview
          1. The project section
          2. The editor and assistant editor sections
            1. Source code editors
            2. The assistant editor
          3. The utility/inspector section
        4. The Apple development languages
          1. Swift
        5. Summary
      10. 3. Playgrounds
        1. Introduction
        2. Swift Playgrounds
          1. The UI
        3. Learning Swift
          1. Console output printing
          2. Working with variables
            1. Variable types
            2. Declaring variables
            3. What are Int, Double, and Float variables
            4. Adding different types
            5. Booleans
            6. Arrays and dictionaries
              1. Array objects
                1. Initializing array objects
                2. Appending values
                3. Removing values
                4. Inserting values
                5. Iterating values
                6. Enumerating values
              2. Dictionary objects
                1. Adding values
                2. Replacing values
                3. Removing Values
                4. Iterating values
            7. Tuples
              1. Accessing the members of a tuple
              2. Named access to tuple members
            8. Strings
              1. Appending strings
              2. Formatting strings
            9. Any and AnyObject
          3. Control flows and code execution
            1. The if statement
            2. The if..else statement
            3. The if..elseif..else statement
            4. The ternary operator
            5. For loops
              1. The for-increment loop
              2. The for-in loop
              3. Using for with strings
              4. Using for with numeric ranges
              5. Stepped ranges
            6. The While loop
            7. The switch condition
          4. Functions
            1. Return values
              1. The no-return value function
              2. The single-return value function
              3. The multiple-return value function
            2. Parameters
              1. The single parameter function
              2. The multiple parameter function
              3. Named parameters
              4. Shorthand external parameter names
              5. Optional parameters with default values
              6. Passing multiple parameters
            3. Using closures
          5. Objects
            1. Classes
              1. Properties
            2. Enumerations
          6. Extensions – extending the classes
            1. Operator overloading
              1. The prefix operator
              2. The postfix operator
              3. The infix operator
        4. Summary
      11. 4. Interface Builder
        1. Introducing Interface Builder
          1. Creating a basic interface
            1. Elements on the view
          2. Adaptive UI
          3. Adding scenes
          4. Navigating between View Controllers
          5. Building a simple application
            1. Adding items to Table View
            2. Different elements for different orientations and dimensions
            3. Adding the code
            4. Autolayout
            5. Subclassing
            6. Quick help
            7. Managing connections
            8. Adding gesture recognizers
          6. Segues and connections
        2. Summary
      12. 5. Custom Controls
        1. An introduction to custom controls
        2. The basics
          1. Creating a class
          2. Properties
          3. Changing properties from the inspector
          4. Enhancing custom controls
            1. Adding some text
          5. Frameworks
            1. Creating a framework
            2. Debugging custom controls
        3. Summary
      13. 6. Debugging
        1. Breakpoints
          1. Listing all the breakpoints
          2. Navigating
          3. The console
          4. Understanding the debug information
          5. Visualizing variables with the Quick Look functionality
            1. Using images with quick view
          6. Debugging the view hierarchy
          7. Introducing debug gauges
        2. Summary
      14. 7. Building and Running
        1. Simulator
          1. Choosing the device
        2. Preparing for distribution
          1. Configuring the project settings
            1. The Identity section
            2. The Deployment Info section
            3. Application icons and launch images
            4. Linked frameworks and libraries
          2. The Capabilities tab
          3. The Info tab
          4. The Build tabs
          5. The Targets tab
        3. Setting project-wide properties
          1. Code signing
          2. Organizer
        4. Summary
      15. A. Conditional Execution and Interface Designing
        1. More?.Swift!
        2. Differences between iOS 7.x and 8.x SDK
          1. Location services
          2. Conditional execution
            1. Displaying alerts
            2. Showing an alert with ActionController
            3. Showing ActionSheet with AlertController
          3. Designing in Interface Builder
          4. Adaptive UI
        3. Summary
      16. Index