Learning Swift

Build a solid foundation in Swift to develop smart and robust iOS and OS X applications
Preview in Mapt

Learning Swift

Andrew J Wagner

1 customer reviews
Build a solid foundation in Swift to develop smart and robust iOS and OS X applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packtโ€™s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning Swift Book Cover
Learning Swift
$ 35.99
$ 25.20
Learn Swift 4 by Building Applications Book Cover
Learn Swift 4 by Building Applications
$ 31.99
$ 22.40
Buy 2 for $35.00
Save $32.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781784392505
Paperback266 pages

Book Description

Swift is Apple's new programming language and the future of iOS and OS X app development. At its surface, Swift is easy to jump into, but it has complex elements that are critical to becoming proficient at turning an idea into reality.

Develop the skills and confidence to dive passionately into creating compelling, maintainable, and elegant apps in Swift. This book provides an approachable, step-by-step introduction into programming with Swift. Each topic is separated into comprehensive sections that are full of practical examples and easy-to-understand explanations. Each section builds on the previous topics to develop a comprehensive understanding of app development in Swift.

It begins by giving an overview of the key features with practical examples and progresses to more advanced topics that help differentiate the skillful developers from the mediocre ones. It covers topics, such as variables, optionals, closures, generics, and memory management. In addition, this book also covers the art of programming, such as maintainability, useful design patterns, and resources for furthering your knowledge. This all culminates in writing a basic iOS app that will get you well on your way to turning your own app ideas into a reality.

Table of Contents

Chapter 1: Introducing Swift
Defining our goals for this book
Setting up the development environment
Running our first Swift code
Understanding playgrounds
Learning with this book
Summary
Chapter 2: Building Blocks โ€“ Variables, Collections, and Flow Control
Core Swift types
Swift's type system
Printing on the console
Control flow
Functions
Bringing it all together
Summary
Chapter 3: One Piece at a Time โ€“ Types, Scopes, and Projects
Structs
Classes
Enumerations
Projects
Extensions
Scope
Access control
Summary
Chapter 4: To Be or Not to Be โ€“ Optionals
Introducing optionals
Unwrapping an optional
Optional chaining
Implicitly unwrapped optionals
Debugging optionals
The underlying implementation
Summary
Chapter 5: A Modern Paradigm โ€“ Closures and Functional Programming
Functional programming philosophy
Closures
Building blocks of functional programming in Swift
Lazy evaluation
Curried functions
Summary
Chapter 6: Make Swift Work for You โ€“ Protocols and Generics
Protocols
Defining a generic
Extending the existing generics
Putting protocols and generics to use
Summary
Chapter 7: Everything is Connected โ€“ Memory Management
How data is stored in a computer
Value types versus reference types
Automatic reference counting
Strong reference cycles
Lost objects
Summary
Chapter 8: Writing Code the Swift Way โ€“ Design Patterns and Techniques
What is a design pattern?
Behavioral patterns
Structural patterns
Creational patterns
Using associated values effectively
Extending system types to reduce code
Lazy properties
Summary
Chapter 9: Harnessing the Past โ€“ Understanding and Translating Objective-C
Swift's relationship with Objective-C
The history of Objective-C
Constants and variables
Containers
Control flow
Functions
Types
Projects
Calling Objective-C code from Swift
Using functions
Summary
Chapter 10: A Whole New World โ€“ Developing an App
Conceptualizing the app
Setting up the app project
Configuring the user interface
Running the app
Allowing picture taking
Temporarily saving a photo
Populating our photo grid
Refactoring to respect Model-View-Controller
Permanently saving a photo
Summary
Chapter 11: What's Next? Resources, Advice, and Next Steps
Apple's documentation
Forums and blogs
Prominent figures
Podcasts
Summary

What You Will Learn

  • Form a solid understanding of the Swift language
  • Learn the practical aspects of how a computer program actually works
  • Understand the paradigms used by Apple's frameworks and not be intimidated by them
  • Utilize the vast resources written in Objective-C to better inform your Swift programming
  • Develop a basic portfolio of Swift code, covering and practicing critical concepts
  • Discover resources to ensure you never stop becoming a better developer
  • Write and understand concise but expressive functional style code
  • Implement various Swift design patterns to solve real-world problems
  • Create your own generics for existing applications

Authors

Table of Contents

Chapter 1: Introducing Swift
Defining our goals for this book
Setting up the development environment
Running our first Swift code
Understanding playgrounds
Learning with this book
Summary
Chapter 2: Building Blocks โ€“ Variables, Collections, and Flow Control
Core Swift types
Swift's type system
Printing on the console
Control flow
Functions
Bringing it all together
Summary
Chapter 3: One Piece at a Time โ€“ Types, Scopes, and Projects
Structs
Classes
Enumerations
Projects
Extensions
Scope
Access control
Summary
Chapter 4: To Be or Not to Be โ€“ Optionals
Introducing optionals
Unwrapping an optional
Optional chaining
Implicitly unwrapped optionals
Debugging optionals
The underlying implementation
Summary
Chapter 5: A Modern Paradigm โ€“ Closures and Functional Programming
Functional programming philosophy
Closures
Building blocks of functional programming in Swift
Lazy evaluation
Curried functions
Summary
Chapter 6: Make Swift Work for You โ€“ Protocols and Generics
Protocols
Defining a generic
Extending the existing generics
Putting protocols and generics to use
Summary
Chapter 7: Everything is Connected โ€“ Memory Management
How data is stored in a computer
Value types versus reference types
Automatic reference counting
Strong reference cycles
Lost objects
Summary
Chapter 8: Writing Code the Swift Way โ€“ Design Patterns and Techniques
What is a design pattern?
Behavioral patterns
Structural patterns
Creational patterns
Using associated values effectively
Extending system types to reduce code
Lazy properties
Summary
Chapter 9: Harnessing the Past โ€“ Understanding and Translating Objective-C
Swift's relationship with Objective-C
The history of Objective-C
Constants and variables
Containers
Control flow
Functions
Types
Projects
Calling Objective-C code from Swift
Using functions
Summary
Chapter 10: A Whole New World โ€“ Developing an App
Conceptualizing the app
Setting up the app project
Configuring the user interface
Running the app
Allowing picture taking
Temporarily saving a photo
Populating our photo grid
Refactoring to respect Model-View-Controller
Permanently saving a photo
Summary
Chapter 11: What's Next? Resources, Advice, and Next Steps
Apple's documentation
Forums and blogs
Prominent figures
Podcasts
Summary

Book Details

ISBN 139781784392505
Paperback266 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Swift Essentials Book Cover
Swift Essentials
$ 29.99
$ 21.00
Mastering Swift 2 Book Cover
Mastering Swift 2
$ 39.99
$ 28.00
Mastering Object-oriented Python Book Cover
Mastering Object-oriented Python
$ 26.99
$ 18.90
Swift 2 Blueprints Book Cover
Swift 2 Blueprints
$ 35.99
$ 25.20
Swift Essentials - Second Edition Book Cover
Swift Essentials - Second Edition
$ 27.99
$ 19.60
Git: Version Control for Everyone Book Cover
Git: Version Control for Everyone
$ 23.99
$ 16.80