From d9ab540040202340969e18f2a9a9b72ba81d118e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 9 May 2026 13:17:02 +0000 Subject: [PATCH 1/2] Match iOS 26 card corner radius (32pt) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS 26's floating sheet-style cards (Maps, Music's Now Playing, Wallet) use noticeably larger, more concentric corners than the 12pt we inherited from earlier iOS versions. Bump the radius to 32pt on the iOS 26 code paths only — card body, header glass effect, and the headerView's CALayer clip mask all stay in sync via a single Constants.iOS26CornerRadius value. iOS 18 and earlier are unchanged. https://claude.ai/code/session_01EKi7mRkcuXcKMxcb1JZ1qZ --- .../TGCardViewController.swift | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Sources/TGCardViewController/TGCardViewController.swift b/Sources/TGCardViewController/TGCardViewController.swift index 58b8f53..b37a877 100644 --- a/Sources/TGCardViewController/TGCardViewController.swift +++ b/Sources/TGCardViewController/TGCardViewController.swift @@ -100,8 +100,10 @@ open class TGCardViewController: UIViewController { fileprivate static let tapAnimationDuration = 0.25 fileprivate static let mapShadowVisibleAlpha: CGFloat = 0.25 - + fileprivate static let floatingHeaderTopMargin: CGFloat = 20 + + fileprivate static let iOS26CornerRadius: CGFloat = 32 } public enum Mode { @@ -323,9 +325,9 @@ open class TGCardViewController: UIViewController { cardWrapperEffectView.effect = UIGlassEffect(style: .regular) headerEffectView.effect = UIGlassEffect(style: .regular) #endif - cardWrapperEffectView.cornerConfiguration = .corners(radius: 12) - - headerEffectView.cornerConfiguration = .corners(topLeftRadius: nil, topRightRadius: nil, bottomLeftRadius: 12, bottomRightRadius: 12) + cardWrapperEffectView.cornerConfiguration = .corners(radius: Constants.iOS26CornerRadius) + + headerEffectView.cornerConfiguration = .corners(topLeftRadius: nil, topRightRadius: nil, bottomLeftRadius: Constants.iOS26CornerRadius, bottomRightRadius: Constants.iOS26CornerRadius) } else { cardWrapperEffectView.effect = nil headerEffectView.effect = nil @@ -1953,7 +1955,12 @@ extension TGCardViewController { private func updateHeaderStyle() { @MainActor func applyCornerStyle(to view: UIView) { - let radius: CGFloat = 12 + let radius: CGFloat + if #available(iOS 26.0, *) { + radius = Constants.iOS26CornerRadius + } else { + radius = 12 + } let roundAllCorners = cardIsNextToMap(in: traitCollection) view.layer.maskedCorners = roundAllCorners From d2665521736b177d8c2f17a425d15b4874798ea8 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Sun, 10 May 2026 19:22:11 +1000 Subject: [PATCH 2/2] Compile fix --- Sources/TGCardViewController/TGCardViewController.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/TGCardViewController/TGCardViewController.swift b/Sources/TGCardViewController/TGCardViewController.swift index b37a877..bd34b23 100644 --- a/Sources/TGCardViewController/TGCardViewController.swift +++ b/Sources/TGCardViewController/TGCardViewController.swift @@ -325,9 +325,14 @@ open class TGCardViewController: UIViewController { cardWrapperEffectView.effect = UIGlassEffect(style: .regular) headerEffectView.effect = UIGlassEffect(style: .regular) #endif - cardWrapperEffectView.cornerConfiguration = .corners(radius: Constants.iOS26CornerRadius) + cardWrapperEffectView.cornerConfiguration = .corners(radius: UICornerRadius.fixed(Constants.iOS26CornerRadius)) - headerEffectView.cornerConfiguration = .corners(topLeftRadius: nil, topRightRadius: nil, bottomLeftRadius: Constants.iOS26CornerRadius, bottomRightRadius: Constants.iOS26CornerRadius) + headerEffectView.cornerConfiguration = .corners( + topLeftRadius: nil, + topRightRadius: nil, + bottomLeftRadius: UICornerRadius.fixed(Constants.iOS26CornerRadius), + bottomRightRadius: UICornerRadius.fixed(Constants.iOS26CornerRadius) + ) } else { cardWrapperEffectView.effect = nil headerEffectView.effect = nil