SWIFT 4.2: Tips, Tricks, and Techniques

SWIFT 4.2: Tips, Tricks, and Techniques
SWIFT 4.2: Tips, Tricks, and Techniques

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 2h 19m | 0.98 GB
eLearning | Skill level: All Levels


Build powerful and efficient iOS apps with proven techniques and tricks in Swift to increase productivity

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.

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.

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.

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).

What You Will Learn

  • Use Xcode Playground to build iOS apps efficiently with Swift 4
  • Discover tricks to use variables, constants, type annotations, and string interpolation to improve overall code efficiency.
  • Easy ways to define functions and invoke them, to makes it fun to work with functions in Swift 4
  • Tips on using closures, tuples, and protocols
  • Easy ways to use closures and protocols in Swift programming
  • Some of the best coding practices and conventions to be followed when working with Swift
+ Table of Contents

Type Less with Extensions
The Course Overview
Color Extension
Square Extension
Creating Extensions with Static Factory Methods
Print All Elements in an Array with Generics
Split Array by Chunks of Size
Get Next Element in Array
Remove Object from Array

Tips for Better Use of Code Structure
Expressively Matching a Value Against a List of Candidates
Avoiding Massive View Controllers
Optional Methods in Protocols
Using Self-Executing Closures for Lazy Properties
Type Inference for Lazy Properties

Use Loop for Less Bugs Tips
For Loop versus While Loop
Using Where in For Loops
Loops with Functional Programming

Tips for Optional Unwrapping and Coalescing
guard let versus if let
Safe Way to Return Element at Specified Index
Using the New nil Coalescing
Conditional Coalescing

Leverage Enums, Tuples and Print, and More
Enum Type Safety
allcases Property for Enum
Comparing Tuples
Print Separator and Terminator
Passing Operators as Closures
Avoid Default in Switch Cases
Working on Async in Playgrounds

Tips in Using UIKit
Named UIColors
Use Override to Hide Status Bar
Transparent/Opaque Navigation Bar
Add Gradient to Navigation Bar
Left/Right Text Offset for UITextField
Update UIView with Fade Transition

Tricks to Handle Errors, UserDefaults, Dictionaries, and More
Enumerated Iteration
Write Good Error Messages
assert, precondition, and fatalError
Semicolons in Swift
Split String into Words
Defining Static URLs Using String Literals
Create a Fallback for UserDefaults with Register
Update Dictionary with Dictionary