From b5a8377e679e6243ddc79a421c10376c193043c1 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 22 Feb 2024 14:06:05 -0800 Subject: [PATCH] Fix IAA banner animation artifacts (#2996) * Animate placeholder to image transition when image isn't a gif/similar * Migrate accessibility sample * Use geometryGroup where possible and transformEffect workaround otherwise * Don't animate setting currentImage --------- Co-authored-by: crow --- Accessibility Sample/Accessibility Sample/AppView.swift | 2 +- .../Source/InAppMessage/View/InAppMessageBannerView.swift | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Accessibility Sample/Accessibility Sample/AppView.swift b/Accessibility Sample/Accessibility Sample/AppView.swift index 112870598..58171260a 100644 --- a/Accessibility Sample/Accessibility Sample/AppView.swift +++ b/Accessibility Sample/Accessibility Sample/AppView.swift @@ -17,7 +17,7 @@ struct AppView: View { systemImage: "square.3.layers.3d.down.left" ) }.onAppear { - Airship.shared.privacyManager.enableFeatures(.push) + Airship.privacyManager.enableFeatures(.push) Airship.push.userPushNotificationsEnabled = true Airship.push.backgroundPushNotificationsEnabled = true } diff --git a/Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageBannerView.swift b/Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageBannerView.swift index 17cbe9a21..a78103e57 100644 --- a/Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageBannerView.swift +++ b/Airship/AirshipAutomation/Source/InAppMessage/View/InAppMessageBannerView.swift @@ -148,7 +148,12 @@ struct InAppMessageBannerView: View { let itemSpacing: CGFloat = 16 VStack(spacing:itemSpacing) { - contentBody + if #available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *) { + contentBody.geometryGroup() + } else { + contentBody.transformEffect(.identity) + } + buttonsView }.padding([.top, .horizontal], itemSpacing) .addNub(placement: displayContent.placement,