Enum Associated Values + Swift Result Type

  Рет қаралды 4,031

Stewart Lynch

Stewart Lynch

Күн бұрын

This video's focus is on Associated Values in Enums.
As well as storing a simple value, enums can also store associated values attached to each case. This lets you attach additional information to your enums so they can represent more specific information.
In this video we will see how we can work with associated values and as a bonus I investigate a very special one, the Swift Result Type and how it all ties in with thowing functions and completion handlers.
Table of Contents:
0:00 Introduction
1:41 Associated Types
4:59 Associated Values
10:24 Completion Handers and and Throwing Functions
15:34 The Result Type
Starter Project Files:
www.createchsol.com/StarterPro...
Completed Project:
github.com/StewartLynch/Enum-...
Other Enum videos
Introduction to Enums
• Introduction to enums ...
Using Enums #1
• Using Enums Example 1
Multiple Sheets in SwiftUI with Enums
• Enums for Multiple Sheets
Other references:
Completion Handlers:
• Completion Handlers
The Swift Result Type:
• A Better Result
Throw, Try Try? Try! Catch
• Throw, Try, Try? Try! ...
Other References:
Stewart Lynch's KZfaq Channel:
/ stewartlynch
Stewart Lynch on Twitter:
/ stewartlynch
CreaTECH Solutions Website:
www.createchsol.com
Stewart Lynch's GitHub:
github.com/StewartLynch
Buy me a coffee :)
ko-fi.com/stewartlynch
******* Download my StewartLynch KZfaq Channel Application - Free **********
stewartlynch.gumroad.com/l/obsjz

Пікірлер: 26
Dealing with Optionals in Swift
31:15
Stewart Lynch
Рет қаралды 1,8 М.
Introduction to Generics in Swift
24:14
Stewart Lynch
Рет қаралды 5 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 128 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 11 МЛН
This is what you can do with Enums in Swift
19:13
Swift and Tips
Рет қаралды 5 М.
Performing Save and Filter on Enums in SwiftData
23:16
azamsharp
Рет қаралды 1,3 М.
Introduction to enums in Swift
15:22
Stewart Lynch
Рет қаралды 5 М.
Introductions to Closures in Swift
25:02
Stewart Lynch
Рет қаралды 12 М.
contains, forEach, sorted
18:06
Stewart Lynch
Рет қаралды 2,1 М.
Throw, Try, Try? Try! Catch
13:38
Stewart Lynch
Рет қаралды 3,9 М.
JSON Decoding Playground for Swift
17:56
Stewart Lynch
Рет қаралды 4,3 М.
Using Enums Example 1
13:37
Stewart Lynch
Рет қаралды 2,1 М.
62 [Джун] Замыкания | Swift уроки
1:08:24
LazyLoad Swift & iOS
Рет қаралды 1,8 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 14 МЛН
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 430 М.