About the editors
Steven Van Impe is the technical editor of this book. Steven is a computer science lecturer at the University College of Ghent, Belgium. When he’s not teaching, Steven can be found on his bike, rattling over cobblestones and sweating up hills, or relaxing around the table, enjoying board games with friends. You can find Steven on Twitter as @svanimpe.
Chris Belanger is the editor of this book. Chris Belanger is the Book Team Lead and Lead Editor for raywenderlich.com. If there are words to wrangle or a paragraph to ponder, he’s on the case. When he kicks back, you can usually find Chris with guitar in hand, looking for the nearest beach, or exploring the lakes and rivers in his part of the world in a canoe.
Ray Fix is the final pass editor of this book. Ray Fix is a software developer from Southern California who is passionate about technology, communication, and helping people become their best. In addition to his role as Swift Team Lead for raywenderlich.com, he is an organizer for the Orange County iOS developer group and a board member for the non-profit, San Diego iOS group. Ray is semi-fluent in spoken and written Japanese and stays healthy by walking, jogging and playing ultimate frisbee. When he is not doing one of those things, he is writing and dreaming of code in Swift!
Table of Contents: Overview
Introduction 16
Section I: Swift Basics 22
Chapter 1: Coding Essentials & Playground Basics .. 24
Chapter 2: Expressions, Variables & Constants 36
Chapter 3: Types & Operations 51
Chapter 4: Basic Control Flow 67
Chapter 5: Advanced Control Flow 84
Chapter 6: Functions 99
Chapter 7: Optionals 112
Section II: Collection Types 124
Chapter 8: Arrays 126
Chapter 9: Dictionaries 139
Chapter 10: Collection Iteration with Closures 148
Section III: Building Your Own Types 159
Chapter 11: Structures 161
Chapter 12: Properties 173
Chapter 13: Methods 185
Chapter 14: Classes 198
Chapter 15: Advanced Classes 213
Chapter 16: Enumerations 233
Chapter 17: Protocols 249
Chapter 18: Generics 266
Section IV: Advanced Topics 281
Chapter 19: Access Control and Code Organization 282
Chapter 20: Custom Operators and Subscripts 296
Chapter 21: Pattern Matching 305
Chapter 22: Error Handling 324
Chapter 23: Asynchronous Closures and Memory Management 341
Chapter 24: Value Types and Value Semantics 354
Chapter 25: Protocol-Oriented Programming 369
Conclusion 383