こちらに書かれていた。
struct MyView: View { @Environment(\.isPresented) var isPresented var body: some View { Rectangle() .onChange(of: isPresented) { newValue in if !newValue { print("detail view is dismissed") } } } }
こちらに書かれていた。
struct MyView: View { @Environment(\.isPresented) var isPresented var body: some View { Rectangle() .onChange(of: isPresented) { newValue in if !newValue { print("detail view is dismissed") } } } }