Swift Cookbook

Over 50 hands-on recipes to help you create apps, solve problems, and build your portfolio of projects in Swift

Swift Cookbook

This ebook is included in a Mapt subscription
Cecil Costa

Over 50 hands-on recipes to help you create apps, solve problems, and build your portfolio of projects in Swift
$0.00
$20.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
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
 
Preview in Mapt

Book Details

ISBN 139781784391379
Paperback392 pages

Book Description

If you have been looking for a book to help you develop apps for iOS on native iOS platforms, this is the book that you've been looking for! This practical guide will supply you with the building blocks that you can turn to when conceptualizing and writing applications for iOS/OS X. You'll master Swift programming as you progress through the various recipes in this book.

Starting with recipes that use the basic features, you will move on to interesting and engaging recipes that will make use of the more complex features of Swift. You will learn how to make use of Swift's diverse features, from the way you can configure your projects to the usage of design patterns and different types of databases. Complete with tips and tricks on Xcode, this example-based guide will help you develop and debug faster.

Table of Contents

Chapter 1: Getting Started with Xcode and Swift
Introduction
Installing Xcode from the App Store
Downloading the Xcode image
Starting a Swift project
Using Swift project options
Creating conditional code
Adding a developer account
Compiling from the command line
Using Swift as an interpreter
Adding a control version system to an existing project
Chapter 2: Standard Library and Collections
Introduction
Creating HTML manually
Printing your object description
Quizzing the user
Searching for perfect numbers
Sorting an array of products
Finding the way out
Working with sets
Creating your own set
Organizing a dinner room
Chapter 3: Using Structs and Generics
Introduction
Creating an exam app
Checking the right answer
Avoiding copying of structs
Creating a generic array initializer
Creating a priority list
Creating a protocol for the priority queue
Chapter 4: Design Patterns with Swift
Introduction
Writing into a log file
Creating a factory of musical notes
Simulating a home automation
Delivering some pizzas
Chapter 5: Multitasking
Introduction
Working of a device while you navigate
Creating an SEO app
Being aware of cyclones
Links on our website
Chapter 6: Playground
Introduction
Creating the first playground
Watching some graphics
Watching the temperature
Stretching an image
Beautifying your text
Receiving JSONs
Dangerous moves
Chapter 7: Swift Debugging with Xcode
Introduction
The Tax income simulator
The best checker movement
Debugging with LLDB
Profiling an app
Chapter 8: Integrating with Objective-C
Introduction
Calling a cab
Hiring a van
Porting from one language to another
Replacing the UI classes
Upgrading the app delegate
Creating a framework
Chapter 9: Dealing with Other Languages
Introduction
Using your old address book
Compressing a message
Using assembly code with Swift
Sharing C++ code with Swift
Chapter 10: Data Access
Introduction
Creating an SQLite database
Checking where your IP is from
Tracking your phone activity
Controlling your stock
Voting devices
Chapter 11: Miscellaneous
Introduction
The geekest keyboard
Time to take your pill
Adding effects to your photos
Being a film critic
Leaving breadcrumbs
Exchanging money

What You Will Learn

  • Install the latest version of Xcode and use all of its tools
  • Develop a multi-language project using Swift, Objective-C, C, and other languages
  • Plan your Swift project and explore the nuts and bolts of the Swift syntax
  • Use Swift playgrounds to see and hear your code's results as you write it
  • Localize your issues using the LLDB debugger and explore different possibilities of code with Swift playgrounds

Authors

Table of Contents

Chapter 1: Getting Started with Xcode and Swift
Introduction
Installing Xcode from the App Store
Downloading the Xcode image
Starting a Swift project
Using Swift project options
Creating conditional code
Adding a developer account
Compiling from the command line
Using Swift as an interpreter
Adding a control version system to an existing project
Chapter 2: Standard Library and Collections
Introduction
Creating HTML manually
Printing your object description
Quizzing the user
Searching for perfect numbers
Sorting an array of products
Finding the way out
Working with sets
Creating your own set
Organizing a dinner room
Chapter 3: Using Structs and Generics
Introduction
Creating an exam app
Checking the right answer
Avoiding copying of structs
Creating a generic array initializer
Creating a priority list
Creating a protocol for the priority queue
Chapter 4: Design Patterns with Swift
Introduction
Writing into a log file
Creating a factory of musical notes
Simulating a home automation
Delivering some pizzas
Chapter 5: Multitasking
Introduction
Working of a device while you navigate
Creating an SEO app
Being aware of cyclones
Links on our website
Chapter 6: Playground
Introduction
Creating the first playground
Watching some graphics
Watching the temperature
Stretching an image
Beautifying your text
Receiving JSONs
Dangerous moves
Chapter 7: Swift Debugging with Xcode
Introduction
The Tax income simulator
The best checker movement
Debugging with LLDB
Profiling an app
Chapter 8: Integrating with Objective-C
Introduction
Calling a cab
Hiring a van
Porting from one language to another
Replacing the UI classes
Upgrading the app delegate
Creating a framework
Chapter 9: Dealing with Other Languages
Introduction
Using your old address book
Compressing a message
Using assembly code with Swift
Sharing C++ code with Swift
Chapter 10: Data Access
Introduction
Creating an SQLite database
Checking where your IP is from
Tracking your phone activity
Controlling your stock
Voting devices
Chapter 11: Miscellaneous
Introduction
The geekest keyboard
Time to take your pill
Adding effects to your photos
Being a film critic
Leaving breadcrumbs
Exchanging money

Book Details

ISBN 139781784391379
Paperback392 pages
Read More

Read More Reviews