Book Image

Swift Essentials - Second Edition

By : Alex Blewitt
Book Image

Swift Essentials - Second Edition

By: Alex Blewitt

Overview of this book

Swift was considered one of the biggest innovations last year, and certainly with Swift 2 announced at WWDC in 2015, this segment of the developer space will continue to be hot and dominating. This is a fast-paced guide to provide an overview of Swift programming and then walks you through in detail how to write iOS applications. Progress through chapters on custom views, networking, parsing and build a complete application as a Git repository, all by using Swift as the core language
Table of Contents (17 chapters)
Swift Essentials Second Edition
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Limitations of playgrounds


Although playgrounds can be very powerful for interacting with code, there are some limitations that are worth being aware of. There is no debugging support in the playground, so it is not possible to add a breakpoint and use the debugger and find out what are the values.

Given that the UI allows tracking values—and that it's very easy to add new lines with just the value to be tracked—this is not much of a hardship. Other limitations of playgrounds include the following:

  • Only the simulator can be used for the execution of iOS-based playgrounds. This prevents the use of hardware-specific features that may only be present on a device.

  • The performance of playground scripts is mainly based on how many lines are executed and how much output is saved by the debugger. It should not be used to test the performance of performance-sensitive code.

  • Although the playground is well suited to present user interface components, it cannot be used for user input.

  • Anything requiring...