title: How to change background color of TabView in swiftUI?
body: <p>Freshman of ios developer.Instead of Objective-c/UIKit, I choose swift/swiftUI to start this.</p>
  <p>Wanna change background of TabView in swiftUI, first I tried to use <code>background</code> modifier but useless, then I found nothing in developer documents to resolve this issue.</p>
  <p>Finally I found a solution <a href="https://stackoverflow.com/questions/65462275/set-background-color-of-tabview-swiftui-2-0">here</a> as below(use UITabBar), it works.</p>
  <p>So I'm so confused about this:</p>
  <ol>
  <li>SwiftUI didn't provide a way to change background color of TabView?We should use UIKit/UITabBar to do this? SwiftUI is just a wrapper of UIKit?</li>
  <li>If the answer of question 1 is YES, Why swiftUI didn't provide it?This is because of imperfection of swiftUI or just Apple didn't want swiftUI developers to change background color of TabBar?In particular scene which we really to do something but swiftUI can't afford it, should i use UIKit additional?</li>
  <li>I'm not a iOS developer, just be insterested in doing this.Should I learn UIKit in swift, or even Objective-c first?Is that a mistake to start with swift/swiftUI?</li>
  </ol>
  <pre><code>import SwiftUI
  
  struct HomeView: View {
      // Use UITabBar to do this.
      init() {
          UITabBar.appearance().backgroundColor = UIColor(.orange)
      }
  
      var body: some View {
          TabView {
              ClockScreen()
                  .tabItem {
                      Image(systemName: &quot;heart.fill&quot;)
                      Text(&quot;Favourites&quot;)
                  }
              ScheduleScreen()
                  .tabItem {
                      Image(systemName: &quot;mappin.circle.fill&quot;)
                      Text(&quot;Friends&quot;)
                  }
              ProfileScreen()
                  .tabItem {
                      Image(systemName: &quot;person.fill&quot;)
                      Text(&quot;Nearby&quot;)
                  }
          }
      }
  }
  
  </code></pre>