SwiftUI TabView with PageTabViewStyle and full screen background colors
Created Aug 23 2020
SWIFT1import SwiftUI23struct ContentView: View {4@State private var selected = 056private let colors: [Color] = [.blue, .white, .black]78var body: some View {9ZStack {10colors[selected].edgesIgnoringSafeArea(.all).animation(.easeIn)11TabView(selection: $selected){12Text("☀️").font(.title/).tag(0)13Text("🌦").font(.title/).tag(1)14Text("⛈").font(.title/).foregroundColor(Color.white).tag(2)15}.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))16.tabViewStyle(PageTabViewStyle())17.animation(.easeIn)18}.statusBar(hidden: true)19}202122}