Is onAppear and onDisappear in a NavigationView of a SwiftUI app behaving as expected?

前端 未结 3 724
滥情空心
滥情空心 2021-02-13 16:18

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

3条回答
  •  情深已故
    2021-02-13 17:03

    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)

提交回复
热议问题