Sams Teach Yourself Swift in 24 HoursIn just 24 lessons of one hour or less, Sams Teach Yourself Swift in 24 Hours helps you build next-generation OS X and iOS apps with Apple's new Swift programming language. This book's straightforward, step-by-step approach helps you quickly master Swift's core concepts, structure, and syntax and use Swift to write safe, powerful, modern code. In just a few hours you'll be applying advanced features such as extensions, closures, protocols, and generics. Every lesson builds on what you've already learned, giving you a rock-solid foundation for real-world success. Step-by-step instructions carefully walk you through the most common Swift development tasks. Practical, hands-on examples show you how to apply what you learn. Quizzes and exercises help you test your knowledge and stretch your skills. Notes and tips point out shortcuts and solutions. Learn how to...
|
Contents
Introducing the Swift Development Environment | 1 |
Learning Swifts Fundamental Data Types | 13 |
Using Operators in Swift | 27 |
Working with Collection Types | 39 |
Understanding Optional Values | 53 |
Controlling Program Flow with Conditionals | 65 |
Iterating Code with Loops | 81 |
Using Functions to Perform Actions | 99 |
Digging Deeper with Properties | 205 |
Adding Advanced Type Functionality | 223 |
Understanding Memory Allocation and References | 243 |
Using Protocols to Define Behavior | 263 |
Using Extensions to Add Type Functionality | 285 |
Working with Optional Chaining | 301 |
Introducing Generics | 313 |
Adding Interoperability with ObjectiveC | 329 |
Understanding Higher Order Functions and Closures | 117 |
Learning About Structs and Classes | 137 |
Implementing Class Inheritance | 155 |
Harnessing the Power of Enums | 171 |
Customizing Initializers of Classes Structs and Enums | 185 |
Other editions - View all
Common terms and phrases
AnyObject array assign associated values asynchronous barcode Bool called closure completed Try computed property conform convenience initializer create curly brace data types declare default defined deinitialized delegate designated initializer dictionary discuss displays Double elements enum example execution extension false Figure following code for-in loop getter hour implementation inherit init inside instance method integer interface iPhone iterate JSON keyword learned Listing nested functions NSString object Objective-C Open Xcode optional chaining optional value override func parameter name placeholder type programming protocol reference types result return statement return type return value Song Square standard library stored properties storyboard strong reference struct structs and classes subclass subscripts superclass switch statement syntax Table View Controller title property tuple type inference type Int type properties type safety type String Unary operators value types variable or constant View Controller scene weak reference