How to use Subscripts in Swift | Advanced Learning #32

  Рет қаралды 2,893

Swiftful Thinking

Swiftful Thinking

Күн бұрын

Пікірлер: 7
@colbymehmen
@colbymehmen Жыл бұрын
Hey great videos, one thing i noticed was you said `You can only have one subscript for each type you are injecting`, because you aren't passing parameters. You actually can have parameters for subcripts example => `public subscript (safe index: Index?) -> Element? {`, but surprisingly enough, still limits limits yo to one subscript per type. Just thought i'd share.
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Oh man I did not realize that 😅 thanks for the comment. I’ll pin this so others can see it!
@colbymehmen
@colbymehmen Жыл бұрын
@@SwiftfulThinking You were ultimately still right, it still limits you to one even with the parameter label. Really enjoy the vids! Thanks
@khaneja
@khaneja Жыл бұрын
Just wanted to say you and your work is awesome. Count me as a fan Nick!
@unthinkabilities
@unthinkabilities Жыл бұрын
Amazing video once again Nick! You really are my favorite Swift/SwiftUI resource :)
@elaidzhashchukin7268
@elaidzhashchukin7268 Жыл бұрын
Thank u, Nick :)
@Jonathan.B
@Jonathan.B 9 ай бұрын
I don't know if something has changed, but if I put in an Int subscript, I get no crash and it uses my version. I checked by using if index == atIndex - 1 which gives me an array with subscripts starting at 1. (XCode 15.3, iOS 17.4)
How to create custom Operators in Swift | Advanced Learning #33
12:15
Swiftful Thinking
Рет қаралды 2,3 М.
How to use KeyPaths in Swift | Advanced Learning #29
25:12
Swiftful Thinking
Рет қаралды 4,1 М.
ВЛОГ ДИАНА В ТУРЦИИ
1:31:22
Lady Diana VLOG
Рет қаралды 1,2 МЛН
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
How to use Subscripts in Swift: Explained with Examples
11:10
Swift and Tips
Рет қаралды 3 М.
How to use Lazy in Swift
9:56
Sean Allen
Рет қаралды 40 М.
Dependency Injection for Swift Developers
8:56
donny wals
Рет қаралды 901
Understanding Swift KeyPaths
28:06
Stewart Lynch
Рет қаралды 4,5 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 320 М.
HashMaps & Dictionaries, Explained Simply
22:44
Nic Barker
Рет қаралды 14 М.
Inheritance vs Interfaces (Protocols) In Swift
18:43
iCode
Рет қаралды 15 М.
Java Enums Explained in 6 Minutes
5:58
Coding with John
Рет қаралды 279 М.
Swift Closures Explained - The ONLY video you'll ever need!
17:33
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 577 М.
ВЛОГ ДИАНА В ТУРЦИИ
1:31:22
Lady Diana VLOG
Рет қаралды 1,2 МЛН