SwiftUI TabView Tutorial - How to work with Tab Bar Navigation, Page Style, and tab items
Karin Prater Karin Prater
16.3K subscribers
16,400 views
0

 Published On Jun 15, 2023

In this SwiftUI tab bar tutorial, I explain how to use TabView in your SwiftUI projects. TabView is an essential component in creating navigation structures for iOS applications. I walk you through the process of setting TabView with tabItem, including adding multiple pages and changing the TabView styling like paging and background tab bar colors.

One of the key features I discuss is programmatically changing the selected tab, which is especially useful for creating onboarding sequences or navigating through a series of pages. I demonstrate how to use the selection binding to control the tab selection and perform actions based on the selected tab.

I also provide tips on customizing the appearance of the TabView, such as changing the background color and styling the selected and unselected tabs. Additionally, I show you how to integrate the TabView into a macOS settings view, highlighting its versatility and usefulness across multiple platforms.

📃 See the code and explanations in this blog post https://www.swiftyplace.com/blog/tabv...

00:00 introduction
02:08 Basic example of TabView and tabitem
09:17 TabView appearance for page styling
14:34 How to change the tab bar background color
20:00 Using TabView on macOS for the Settings window
22:25 Programmatically changing the selected tab
29:09 wrap up

If you liked what you learned and you want to see more, check out one of my courses!
👨‍💻 my SwiftUI course https://school.swiftyplace.com/course...
👨‍💻 my Core Data and SwiftUI course https://school.swiftyplace.com/course...

#SwiftUI #TabView #Tabbar #Navigation

show more

Share/Embed