In SwiftUI, entering a text field in TabView calls all its views' onAppear()

157 Views Asked by At

I have a TabView like so:

TabView {
  View1().tabItem{Text("1")}
  View2().tabItem{Text("2")}
  View3().tabItem{Text("3")}
}

Whenever I enter a TextField in any of the views, onAppear() gets called on all of the views causing bugs and other issues.

Anyone know what could be causing this?

0

There are 0 best solutions below