Member-only story
Harnessing the Power of Tab Bars in SwiftUI
We all used to enjoy UITabBarController, right?
I’ve seen loads of articles which relate to tabs in SwiftUI
Difficulty: Beginner | Easy | Normal | Challenging
Prerequisites
- Be able to produce a “Hello, World!” SwiftUI project
Keywords and Terminology
TabView: A SwiftUI container that provides a tab-based interface. Users can switch between multiple views through tabs at the bottom of the screen.
UITabBarController: A UIKit class which manages a tab-based interface. Users can switch between multiple view controllers through tabs at the bottom of the screen.
What is a TabBar anyway?
As iOS developer we often get designers asking us to deliver tab-based interfaces.
They give users reasonable control over which view controller they see at any given time.
However, we are talking here about *SwiftUI*. We aren’t talking about view controllers or screens here. We are talking about views.
So how can we get several views to be displayed in a rather nice tab view?