MENU

Fun & Interesting

Crafting Effective SwiftUI ViewModifiers

Stewart Lynch 1,539 lượt xem 3 weeks ago
Video Not Working? Fix It Now

In this video, I’ll show you how to leverage SwiftUI ViewModifiers to improve code readability, flexibility, and maintainability. We’ll create three custom view modifiers that you can start using in your SwiftUI projects today. Each modifier enhances different aspects of UI development, from embedding views in a navigation stack to styling text editors and applying customizable background views.

By the end of this tutorial, you’ll have a deeper understanding of how ViewModifiers work and how to make your SwiftUI code more reusable and efficient.

If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch

******** Download my StewartLynch YouTube Channel Application - Free ***********
https://stewartlynch.gumroad.com/l/obsjz

Enroll in my full length multi-target course to build a Mac Menubar app, an iOS App with WIdgets and a WatchKit app
https://stewartlynch-school.teachable.com/p/smile4me-swift-swiftui-app

Table of Contents:
0:00 Introduction
0:22 InNavStack Modifier
6:10 TextEditor RoundedBorder Style
16:10 Custom View Backgrounds Modifier

Starter Project Files:
https://github.com/StewartLynch/Effective-ViewModifiers
Completed Project:
https://github.com/StewartLynch/Effective-ViewModifiers/tree/CompletedSourceCode

References mentioned in video:
Custom View Modifiers
https://youtu.be/XdfVPPfnZZU

Recommended Resources:

RocketSim - Build Apps Faster
https://gumroad.com/a/122988499/ftvbh

BigMountain Studio Books
SwiftData Mastery in SwiftUI
https://www.bigmountainstudio.com/swiftdata/77jt8
SwiftUI Views Mastery
https://www.bigmountainstudio.com/views-16/77jt8
SwiftUI 5 Book Bundle
https://www.bigmountainstudio.com/book-bundle/77jt8
Combine Mastery in SwiftUI
https://www.bigmountainstudio.com/combine/77jt8
Core Data Mastery in SwiftUI
https://www.bigmountainstudio.com/core-data/77jt8
SwiftUI Animations Mastery
https://www.bigmountainstudio.com/animations-16/77jt8

Other References:
Stewart Lynch's YouTube Channel:
https://youtube.com/@StewartLynch
Stewart Lynch on Mastodon:
https://iosdev.space/@StewartLynch
Stewart Lynch on BlueSky:
@stewartlynch.bsky.social
Stewart Lynch On Threads:
@StewartLynch
Stewart Lynch on X:
https://x.com/StewartLynch
Stewart Lynch on LinkedIn
https://www.linkedin.com/in/stewartlynch

Comment