How to use Access Control (Private vs Public) | Swift Basics #12

  Рет қаралды 6,226

Swiftful Thinking

Swiftful Thinking

Күн бұрын

Master the art of access control in Swift with this comprehensive tutorial! Learn how to control the visibility and accessibility of your code using keywords like public, private, and internal. Discover the benefits of encapsulating your code to enhance security and maintainability. Gain a deep understanding of module-level access control and how it affects your Swift projects. Start your journey to becoming a proficient Swift developer today and take full control of your code with access control in Swift!
🤙 WELCOME BACK 🤙
WEBSITE: www.swiftful-thinking.com
DISCORD: / discord
GITHUB: github.com/SwiftfulThinking/
SAY THANKS: www.buymeacoffee.com/nicksarno
00:00 Access Control
00:00 Intro
02:47 Welcome back!
03:32 Example
09:12 Public vs Private
12:29 Review
15:49 Wrapping up
17:00 Rule of Thumb
17:58 Conclusion

Пікірлер: 25
@kdtechniquesofficial6153
@kdtechniquesofficial6153 Жыл бұрын
I've never heard of Step Brothers, and I just watched the trailer and will watch it. Thanks.
@cheunghowie2596
@cheunghowie2596 19 күн бұрын
Really nice lesson! Thank you so much!!!!
@Brychyx
@Brychyx Жыл бұрын
Awesome videos with proper knowledge. Also very easy to learn from your courses. Thank you!
@user-dx3hm7sm6j
@user-dx3hm7sm6j Жыл бұрын
Great lesson! Thank you very much!💫
@ubuandeyelbme
@ubuandeyelbme 5 ай бұрын
Woot woot! We cruizin'! Think I'm finally comfortable with the syntax... getting there. Can't thank you enough, Nick! 🙏🏻
@MA-qr6vh
@MA-qr6vh 6 ай бұрын
Just want to say that you are the best. Thank you, Nick!
@AdamTabiev
@AdamTabiev Жыл бұрын
Nick thank you for another quality lesson🔥
@egorsev
@egorsev Жыл бұрын
Hey, Nick! As always, great and brilliant.
@kamaldeepak4282
@kamaldeepak4282 Жыл бұрын
Thank you ❤
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Welcome! 👍
@psaudade
@psaudade 4 ай бұрын
Excelente Videos! Learning a lot. You can use a private var on movie2 and with setter and getter go for a read/write new values. I've made a new mutating func on the struct that is called from the class passing the title arguments. Worked fine! I know you can do that, but i'm learning!!!!! Great Job you are doing, continue!
@unitedastronomer
@unitedastronomer 3 ай бұрын
theyre finally making senseee omg
@DeclanBav101
@DeclanBav101 9 ай бұрын
Thank you
@user-wb9xp6qq5y
@user-wb9xp6qq5y Ай бұрын
I like the way you explain the code, however, one thing I have noticed is the IDE(Xcode) doesn't work properly. Sometimes it doesn't show the compilation errors.
@SwiftfulThinking
@SwiftfulThinking Ай бұрын
This has something to do with the playground environment. In the next playlist we will use the normal Xcode environment which works better
@uphillradio
@uphillradio Жыл бұрын
Step Brothers 😂 That's my fav
@DannyBoy443
@DannyBoy443 3 ай бұрын
Of the 3 movies listed, I go w/ Avengers. It makes me feel like a kid again and I didn't even like the other two lol.
@loggioRafa
@loggioRafa 4 ай бұрын
i have heard that the var func and everything which is not marked as private is internal, i want to ask, is internal or public?
@SwiftfulThinking
@SwiftfulThinking 4 ай бұрын
Technically ‘internal’ but most people don’t understand what that difference is at this point
@wahhmann123
@wahhmann123 8 ай бұрын
I looked upon some resources and found that if you do not write any access control keywords and the default is actually internal, meaning internal to the module
@panosjapan7
@panosjapan7 11 ай бұрын
I'm looking at his code at around 9:15 and I'm getting errors if I have it the way he has it. It will work if I refactor it to this: ``` class MovieManager{ var movie1: MovieModel var movie2: MovieModel var movie3: MovieModel init(){ movie1 = MovieModel(title: "Avatar", genre: .action, isFavorite: false) movie2 = MovieModel(title: "Step Brothers", genre: .comedy, isFavorite: false) movie3 = MovieModel(title: "Avengers", genre: .action, isFavorite: false) } } ``` Why?
@leneil46
@leneil46 8 ай бұрын
Yo!
@user-to7yg5wm6d
@user-to7yg5wm6d Жыл бұрын
Avengers is my fav❤
How to use Arrays and Sets in Swift | Swift Basics #13
29:12
Swiftful Thinking
Рет қаралды 7 М.
How to use Enums in Swift | Swift Basics #10
15:01
Swiftful Thinking
Рет қаралды 9 М.
🤔Какой Орган самый длинный ? #shorts
00:42
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 21 МЛН
Дибала против вратаря Легенды
00:33
Mr. Oleynik
Рет қаралды 6 МЛН
How to use weak self in Swift | Continued Learning #18
20:33
Swiftful Thinking
Рет қаралды 17 М.
Swift Access Control Explained
9:44
Sean Allen
Рет қаралды 33 М.
Public vs. Private in Swift 5 - Access Control (Xcode 11)
16:43
iOS Academy
Рет қаралды 8 М.
How to use Dictionaries in Swift | Swift Basics #14
18:51
Swiftful Thinking
Рет қаралды 6 М.
All About Access Control in Swift Urdu/Hindi
12:17
Code with Sunny
Рет қаралды 5 М.
These Coding Projects Give You An Unfair Advantage
14:39
Harkirat Singh
Рет қаралды 332 М.
Access Control levels in Swift
19:19
Stewart Lynch
Рет қаралды 1,5 М.