For the following code, the "Appeared..." label only gets displayed for the elements that are initially visible, when others are scrolled into view the onAppear does not get called on WatchOS.
It just shows
... even when the "Not appeared" elements are scrolled into view.
Does anyone know why this might be happening?
It just shows
Code Block Appeared 1 Appeared 2 Appeared 3 Appeared 4 Appeared 5 Not appeared Not appeared Not appeared Not appeared
... even when the "Not appeared" elements are scrolled into view.
Code Block swift struct PagesView : View { var body : some View { TabView { List { ForEach(Array(1...10), id: \.self) { v in Row(number: v) } } } } } struct Row : View { let number : Int @State var label = "Not appeared" var body : some View { Text(label) .onAppear { label = "Appeared \(number)" } } }
Does anyone know why this might be happening?