Make Reusable UI Views in your iOS App [SwiftUI]



Make Reusable UI Views in your iOS App [SwiftUI]

Make Reusable UI Views in your iOS App [SwiftUI]

Welcome to a brand new SwiftUI tutorial, where we’ll explore how reusable custom views can be your best friend as a developer! In this video, I’ll show you how these can streamline your SwiftUI development, making maintenance easier and your workflow more efficient. And we’ll work on this practically with a sample app.

In this tutorial, I’ll cover:
1️⃣ Creating custom views that eliminate duplication of efforts across your projects.
2️⃣ How integrating custom views can improve code organization and maintenance.

See Quick access Timestamps here:

00:00 Intro
05:08 Make Circle Views Reusable.
23:06 Make Button with action Reusable
33:01 Make Reusable custom background view with @ViewBuilder

Disclaimer: At the 22:46 Timestamp, I forgot to remove the isSelected from the Reusable CircleView when it became obvious that we do not need to pass it in when calling the view. Check the code on Github for the updated copy of the code where it is correctly removed. ⭐️
https://github.com/lyndachiwetelu/reusable-views-in-swiftui

Like, comment and share this video with someone who might find it useful. Subscribe for more interesting iOS development and SwiftUI tutorials!