Book description
In 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...
Set up your Swift development environment
Master Swift’s fundamental data types and operators
Make the most of arrays and dictionaries
Control program flow, modify execution paths, and iterate code
Perform complex actions with functions
Work with higher-order functions and closures
Harness the power of structs, enums, classes, and class inheritance
Customize initializers of classes, structs, and enums
Implement instance methods, type methods, and advanced type functionality
Take full advantage of Swift’s advanced memory allocation
Extend type functionality with protocols and extensions
Leverage the power of generics, chaining, and other advanced features
Interoperate with Objective-C code
Interact with user interfaces
Take advantage of Swift’s Standard Library features and functions
Who Should Read this Book
Beginner-intermediate level programmers
Advanced programmers who are not yet familiar with Swift can benefit
Table of contents
- About This eBook
- Title Page
- Copyright Page
- Contents at a Glance
- Table of Contents
- About the Author
- Dedication
- Acknowledgments
- We Want to Hear from You!
- Reader Services
- Introduction
- Hour 1. Introducing the Swift Development Environment
- Hour 2. Learning Swift’s Fundamental Data Types
- Hour 3. Using Operators in Swift
- Hour 4. Working with Collection Types
- Hour 5. Understanding Optional Values
- Hour 6. Controlling Program Flow with Conditionals
- Hour 7. Iterating Code with Loops
-
Hour 8. Using Functions to Perform Actions
- The Nature of Functions in Swift
- General Function Syntax and Structure
- Functions with No Parameters and No Return Type
- The Type of a Function
- Functions with Parameters
- Functions with Variadic Parameters
- Functions with Return Types
- External Parameter Names
- Default Parameter Values
- Change Argument Values with In-Out Parameters
- Summary
- Q&A
- Workshop
- Exercise
- Hour 9. Understanding Higher Order Functions and Closures
- Hour 10. Learning About Structs and Classes
- Hour 11. Implementing Class Inheritance
- Hour 12. Harnessing the Power of Enums
- Hour 13. Customizing Initializers of Classes, Structs, and Enums
- Hour 14. Digging Deeper with Properties
- Hour 15. Adding Advanced Type Functionality
- Hour 16. Understanding Memory Allocation and References
-
Hour 17. Using Protocols to Define Behavior
- Defining Protocols
- Creating and Adopting Protocols
- Properties
- Defining Methods in Protocols
- Using Protocol Names as Types
- Adopting and Inheriting Multiple Protocols
- Optional Protocol Properties and Methods
- How to Check for Protocol Conformance
- Using Protocols for Delegation
- Summary
- Q&A
- Workshop
- Exercise
- Hour 18. Using Extensions to Add Type Functionality
- Hour 19. Working with Optional Chaining
- Hour 20. Introducing Generics
- Hour 21. Adding Interoperability with Objective-C
- Hour 22. Interacting with User Interfaces
- Hour 23. Asynchronous Programming in Swift
- Hour 24. Learning Swift’s Standard Library Functions
- Index
- Code Snippets
Product information
- Title: Swift in 24 Hours, Sams Teach Yourself
- Author(s):
- Release date: November 2014
- Publisher(s): Sams
- ISBN: 9780134032382
You might also like
book
Swift in 24 Hours, Sams Teach Yourself, Second Edition
This is the Rough Cut version of the printed book. In just 24 lessons of one …
book
Sams Teach Yourself Java in 24 Hours, Eighth Edition
Computer programming with Java is easier than it looks. In just 24 lessons of one hour …
book
Swift iOS 24-Hour Trainer
Jump into the app development world with confidence! iOS Swift 24-Hour Trainer combines book and video …
book
Swift 5 for Absolute Beginners: Learn to Develop Apps for iOS
Stay motivated and overcome obstacles while learning to use Swift Playgrounds and Xcode 10.2 to become …