I would like to know if the behavior of onAppear and onDisappear in SwiftUI (Xcode 11 beta 6 when I wrote this) is what a developer would find more useful or it is just being mo
Starting Xcode 11.2 beta (released 02/10/2019), both methods (including .onDisappear()
) are being correctly triggered.
Note that .onDisappear()
was not being triggered until this beta release.
It was a bug on Apple's end.
.onAppear()
now works as it is supposed to in iOS 13.1 and Xcode 11 Beta 7.
When navigating forwards and backwards to the NavigationView, .onAppear()
will trigger.
Both commands: .onDisappear(perform: ) & .onAppear(perform: )
are bugging the NavigationView (.navigationBarTitle) feature:
.navigationBarTitle("Opciones", displayMode: .inline)
When used the navigationBarTitle is removed or not working in the View where you use invoke it. This happens using BOTH: .onDisappear(perform: ) .onAppear(perform: )
Using Xcode Version 12.2 (12B45b)