Skip to content

Using TabView to switch screens (SwiftUI)

   

Here's a sample of how to switch screens using TabView. It's pretty easy to write about, isn't it?

TabView - SwiftUI | Apple Developer Documentation

TabView

import SwiftUI
struct ContentView: View {
var body: some View {
TabView {
Text("The First Tab")
.tabItem {
Image(systemName: "1.square.fill")
Text("First")
}
Text("Another Tab")
.tabItem {
Image(systemName: "2.square.fill")
Text("Second")
}
Text("The Last Tab")
.tabItem {
Image(systemName: "3.square.fill")
Text("Third")
}
}
.font(.headline)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}

  1. Transition from one ListView to another (SwiftUI)
  2. Parsing the Json received in Alamofire using Codable
  3. SwiftUI gets used a lot with Struct
  4. Displaying a List in SwiftUI
  5. Sending push notifications to your app with cURL (curl)
  6. Retrieving a certificate and private key from a P12 file
  7. Update cocoapods installed with gem.