With iOS 17 Apple offers us the likelihood to animate SF Symbols utilizing the brand new symbolEffect()
modifier. I am not in a position to animate symbols in a TabView
. I present you some code:
struct MyApp: App {
@State non-public var gearTabEffect: Bool = false
var physique: some View {
WindowGroup {
TabView {
DashboardView()
.tabItem { Label("Dashboard", systemSymbol: ._01Square) }
SettingsView()
.tabItem { Label("Settings", systemImage: "gear").symbolEffect(.pulse, worth: gearTabEffect) }
.onAppear {
print("settings view appeared")
gearTabEffect.toggle()
}
}
}
}
}
Am I doing one thing incorrect or it is a bug (or function 😄)?