Lixo
This commit is contained in:
@@ -67,7 +67,9 @@ extension View {
|
||||
#if os(macOS)
|
||||
self
|
||||
#else
|
||||
self.navigationBarTitleDisplayMode(.inline)
|
||||
self
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.modifier(AppRoundedBackButtonModifier())
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -139,3 +141,28 @@ extension View {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if !os(macOS)
|
||||
private struct AppRoundedBackButtonModifier: ViewModifier {
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.navigationBarBackButtonHidden(true)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
Button(action: { dismiss() }) {
|
||||
Image(systemName: "chevron.left")
|
||||
.font(.system(size: 24, weight: .semibold))
|
||||
.foregroundStyle(AppColors.textPrimary)
|
||||
.frame(width: 52, height: 52)
|
||||
.background(AppColors.surface)
|
||||
.clipShape(Circle())
|
||||
.shadow(color: .black.opacity(0.06), radius: 8, y: 2)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user