From 1cfe6167e05cf3df1f8524f47dba173b468811dc Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Tue, 19 Apr 2022 23:11:04 +0200 Subject: [PATCH] Use .cancellationAction placement for close button --- Passepartout/App/Constants/Theme.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Passepartout/App/Constants/Theme.swift b/Passepartout/App/Constants/Theme.swift index eab3f40c..76dadf78 100644 --- a/Passepartout/App/Constants/Theme.swift +++ b/Passepartout/App/Constants/Theme.swift @@ -280,7 +280,7 @@ extension String { extension View { func themeCloseItem(presentationMode: Binding) -> some ToolbarContent { - ToolbarItem(placement: .navigationBarLeading) { + ToolbarItem(placement: .cancellationAction) { Button { presentationMode.wrappedValue.dismiss() } label: { @@ -290,7 +290,7 @@ extension View { } func themeCloseItem(isPresented: Binding) -> some ToolbarContent { - ToolbarItem(placement: .navigationBarLeading) { + ToolbarItem(placement: .cancellationAction) { Button { isPresented.wrappedValue = false } label: {