Custom View Modifiers in SwiftUI

preview_player
Показать описание
Simplify your SwiftUI code by creating reusable custom view modifiers.

Table of Contents:
0:00 Introduction
1:30 Tag ViewModifier
9:30 List and Image Modifiers
14:33 Text Overlay Modifier

Starter Project Files:

Completed Project:

Other references:
Enums with Associated Values Video:

Other References:
Stewart Lynch's YouTube Channel:
Stewart Lynch on Twitter:
CreaTECH Solutions Website:
Stewart Lynch's GitHub:

Buy me a coffee :)

******** Download my StewartLynch YouTube Channel Application - Free ***********
Рекомендации по теме
Комментарии
Автор

Thanks for some great examples on ViewModifiers. This helped clear up some of my understanding and will definitely be using these going forward for reusable components.

cloftis
Автор

Stewart, you are an incredible Instructor. I wish you great success with your Channel and most differently. You have added great value the SwiftUI Community. GREAT SUCCESS.... And I am extremely lucky to have found you. Robert

hcri
Автор

A really useful video that I've started to put into use in my current project (my first app to go on to the App Store) and it really helps with clearing up the onscreen 'clutter'. The defining hint was removing the modifiers into separate extensions and accessing them through functions.

I really enjoy Stewart's presentation style in his videos, really useful, clear and understandable.

jeastwood
Автор

Awesome overview of view modifiers. Your teaching style is very approachable, yet advanced. Thank you!

jeffreywilkinson
Автор

Very useful tutorial, you are superb as always Steward! Thanks a lot. 👍🏼

jasurrajabov
Автор

I always give a thump up to add your video to my like list...
& if you talk about a previous video then Make a popup appear on the right corner of the video that refers to that video (It's a youtube feature). That definitely gonna help everyone.
And I want you to make a video on Apple certificates and add them to Xcode. what there purpose and what if multiple users create different certificates for the same app ...I ask some seniors but their statements are different from each other ... Because I can't experiment on my company account that's a dark side for me and junior developers like me.
Thanks a lot for your rich content. :)

abdulwahabkhan
Автор

Thank you for your tutorial. I love when the time you coding you also explain the thought & reason why you write in that way. It really helpful for learning coding the beautiful SwiftUI code.

Hello Stewart, I have a small question is about coding preference. In this video, you demonstrated that you will write for the bigger part of the "Code" or "View", then you divided it into a small piece. Recently, when I was writing the code I was a little confused because sometimes I was overthinking of I need to break those "big components or View" into small pieces first then I will start writing my code. Or generally, people will start from their thought then refactor the code just like the way you have done?

Looking forward to your reply. I really happy that I found your channel today because this video is the exact thing that I searching for the whole day :-).

hung-chuntsai
Автор

In the view extensions; Why do we have to use modifier(...) in the first example and self.modifier(...) in the second??

gakkieNL
Автор

Thanks a lot. Great tutorial. Completed Project -> Link currently not working?
Greetings Peter

peterplass