Skip to content

Commit

Permalink
Configure scrollEdgeAppearance with opaque background (#6038)
Browse files Browse the repository at this point in the history
* 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 <yogevbd@wix.com>

* Update lib/ios/TopBarAppearancePresenter.m

Co-authored-by: Yogev Ben David <yogev132@gmail.com>
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
  • Loading branch information
3 people authored Mar 19, 2020
1 parent 5b79a4f commit a2bdfac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ios/TopBarAppearancePresenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit a2bdfac

Please sign in to comment.