From 29873620b73c3b6d4a39d83fea6c5ce986f2155f Mon Sep 17 00:00:00 2001 From: Robin Kutesa Date: Sat, 16 May 2026 10:58:26 +0300 Subject: [PATCH] Fix presentationCornerRadius iOS 16.0 availability Wrap in a ViewModifier that guards with #available(iOS 16.4, *), keeping the rounded sheet on 16.4+ while compiling clean on 16.0+. Co-Authored-By: Claude Sonnet 4.6 --- Features/Login/LoginView.swift | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Features/Login/LoginView.swift b/Features/Login/LoginView.swift index 8f20fa8..6bca4a7 100644 --- a/Features/Login/LoginView.swift +++ b/Features/Login/LoginView.swift @@ -97,7 +97,7 @@ struct LoginView: View { navigateToDashboard = true } .presentationDetents([.height(200)]) - .presentationCornerRadius(20) + .modifier(SheetCornerRadius(20)) } .onAppear { vm.onAuthenticated = { navigateToDashboard = true } @@ -158,3 +158,15 @@ struct MoreOptionsSheet: View { .buttonStyle(ScaleButtonStyle()) } } + +private struct SheetCornerRadius: ViewModifier { + let radius: CGFloat + init(_ radius: CGFloat) { self.radius = radius } + func body(content: Content) -> some View { + if #available(iOS 16.4, *) { + content.presentationCornerRadius(radius) + } else { + content + } + } +}