Book Image

SWIFT 4.2: Tips, Tricks, and Techniques [Video]

By : Alex Nagy - Rebeloper
Book Image

SWIFT 4.2: Tips, Tricks, and Techniques [Video]

By: Alex Nagy - Rebeloper

Overview of this book

<p>Swift 4.0 is a major new release for everyone's favorite app development language, and introduces a variety of features that let us write simpler safer code. With this course, you will discover new possibilities with SWIFT 4.x and bring improvement to your app development process.</p> <p>In this course, you will work with interesting tools and techniques with examples you can adopt straightaway. You will be able to enhance development speed with less coding and get faster results.</p> <p>By the end of this course, you will have learned some exciting tips, best practices, and techniques for your iOS development. You will be able to build your own applications in Swift much more rapidly and with easily.</p> <p>All the code and supporting files for this course are available on Github at&nbsp;<a href="https://github.com/PacktPublishing/SWIFT-4.2-Tips-Tricks-and-Techniques" target="_blank">https://github.com/PacktPublishing/SWIFT-4.2-Tips-Tricks-and-Techniques</a></p> <h1>Style and Approach</h1> <p>You will be starting the course pretty much from scratch. You will learn what to expect from Swift as a programming language so that you can orient yourself to upcoming content in the course. You will see how the development environment is set up afresh on multiple platforms (iOS/Windows/Linux).</p>
Table of Contents (7 chapters)
Chapter 5
Leverage Enums, Tuples and Print, and More
Content Locked
Section 2
allcases Property for Enum
Retrieving all cases of enum is really a common task, but its implementation is not so clean. We were forced to create a static variable of array with all cases of our enum manually. - In Swift 4.2, we got a really useful property,allcases, which is autogenerated - All you need to do is make your enum conform to the CaseIterable protocol - I show you the example