From a2bdfacb27065f2101c3228df98484ba4ec68e03 Mon Sep 17 00:00:00 2001 From: Robert Paul Date: Thu, 19 Mar 2020 05:31:08 -0500 Subject: [PATCH] Configure scrollEdgeAppearance with opaque background (#6038) * Configure scrollEdgeAppearance with opaque background I noticed there is now an animation that occurs when pushing the first view on a stack. This will happen with both: `largeTitle: { visible: true }` and `largeTitle: { visible: false }` It seems caused by the setting of the `scrollEdgeAppearance` background without first configuring it using `configureWithOpaqueBackground`. I also added checks for iOS 13 since these APIs require iOS 13. * Update lib/ios/TopBarAppearancePresenter.m Co-Authored-By: Yogev Ben David * Update lib/ios/TopBarAppearancePresenter.m Co-authored-by: Yogev Ben David Co-authored-by: Yogev Ben David --- lib/ios/TopBarAppearancePresenter.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ios/TopBarAppearancePresenter.m b/lib/ios/TopBarAppearancePresenter.m index e7fb97ad020..1c15658fe05 100644 --- a/lib/ios/TopBarAppearancePresenter.m +++ b/lib/ios/TopBarAppearancePresenter.m @@ -36,12 +36,14 @@ - (void)updateBackgroundAppearance { [self.getAppearance configureWithTransparentBackground]; [self.getScrollEdgeAppearance configureWithTransparentBackground]; } else if (self.backgroundColor) { + [self.getAppearance configureWithOpaqueBackground]; + [self.getScrollEdgeAppearance configureWithOpaqueBackground]; [self.getAppearance setBackgroundColor:self.backgroundColor]; [self.getScrollEdgeAppearance setBackgroundColor:self.backgroundColor]; } else if (self.translucent) { [self.getAppearance configureWithDefaultBackground]; [self.getScrollEdgeAppearance configureWithDefaultBackground]; - } else { + } else { [self.getAppearance configureWithOpaqueBackground]; [self.getScrollEdgeAppearance configureWithOpaqueBackground]; }