Wiley.com
Print this page Share

Swift For Dummies

ISBN: 978-1-119-02222-0
384 pages
February 2015
Swift For Dummies (1119022223) cover image

Description

Get up and running with Swift—swiftly

Brimming with expert advice and easy-to-follow instructions, Swift For Dummies shows new and existing programmers how to quickly port existing Objective-C applications into Swift and get into the swing of the new language like a pro. Designed from the ground up to be a simpler programming language, it's never been easier to get started creating apps for the iPhone or iPad, or applications for Mac OS X.

Inside the book, you'll find out how to set up Xcode for a new Swift application, use operators, objects, and data types, and control program flow with conditional statements. You'll also get the scoop on creating new functions, statements, and declarations, learn useful patterns in an object-oriented environment, and take advantage of frameworks to speed your coding along. Plus, you'll find out how Swift does away with pointer variables and how to reference and dereference variables instead.

  • Set up a playground development environment for Mac, iPhone, iPad, and wearable computers
  • Move an existing Objective-C program to Swift
  • Take advantage of framework components and subcomponents
  • Create an app that uses location, mapping, and social media

Whether you're an existing Objective-C programmer looking to port your code to Swift or you've never programmed for Apple in the past, this fun and friendly guide gets you up to speed swiftly.

See More

Table of Contents

Introduction 1

Part I: Getting Started with Swift 5

Chapter 1: Setting Up an Xcode Swift Project 7

Chapter 2: Playing in the Playground 39

Chapter 3: Using the Xcode Editing Tools 47

Chapter 4: Creating a Swift App 63

Part II: Introducing Actions 105

Chapter 5: Operating on Data 107

Chapter 6: Using Swift Types  127

Chapter 7: Collecting Objects 153

Chapter 8: Controlling the Flow 175

Chapter 9: Functioning Successfully 191

Part III: Putting Expressions Together 217

Chapter 10: Expressing Yourself 219

Chapter 11: Declaring the Symbols 235

Chapter 12: Initializing and Deinitializing Data 243

Part IV: Using Components and Subcomponents 255

Chapter 13: Expanding Objects with Extensions 257

Chapter 14: Managing Access Control for Your Objects 267

Chapter 15: Building Classes, Structures, and Enumerations 273

Chapter 16: Using Properties, Variables, Outlets, and Actions 287

Chapter 17: Working with Enumerations to Consolidate Values 273

Chapter 18: Using Protocols to Provide Templates for Functionality 313

Chapter 19: Mixing Objective-C and Swift 327

Part V: The Part of Tens 335

Chapter 20: Ten Swift Features That Aren’t in Objective-C 337

Chapter 21: Ten Swift Features That Are Not in C 341

Chapter 22: Ten Objective-C Features That Aren’t in Swift 345

Index 349

See More

Author Information

Jesse Feiler is a developer, trainer, and author. A veteran developer on all iOS and OS X products, he is also the author of iOS App Development For Dummies. Jesse is heard regularly on “The Roundtable,” a program of WAMC Public Radio for the Northeast.

See More

Downloads

Download TitleSizeDownload
Code examples from Chapter 1 30.39 KB Click to Download
Code examples from Chapter 4 72.88 KB Click to Download
Code examples from Chapter 7 1.39 KB Click to Download
Code examples from Chapter 8 2.17 KB Click to Download
Code examples from Chapter 9 76.41 KB Click to Download
Code examples from Chapter 12 2.35 KB Click to Download
Code examples from Chapter 15 1.13 KB Click to Download
Code examples from Chapter 17 1.45 KB Click to Download
Code examples from Chapter 18 1.18 KB Click to Download
Code examples from Chapter 19 59.54 KB Click to Download
All the code examples from Swift For Dummies 215.93 KB Click to Download
See More

Related Titles

Back to Top