TabView tabBar tint color not working as expected in SwiftUI

671 Views Asked by At

I’m going through a Ray Wenderlich course on SwiftUI and currently working on some TabView view. The method for setting the tabBar tint color used in the course is accentColor(_:) which sets the tabBar tint color. However, that method is now deprecated and Apple suggests using tint(_:) method instead.

The problem is that this is the result when using accentColor(_:):

enter image description here enter image description here

but this is the result when using tint(_:):

enter image description here enter image description here

Clearly, tint(_:) method isn’t the correct way of setting the tabBar tint color so my question is does anyone know which method should I use instead as the accentColor(_:) method is now deprecated?

0

There are 0 best solutions below