Bladeren bron

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 <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>
Robert Paul 4 jaren geleden
bovenliggende
commit
a2bdfacb27
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 3
    1
      lib/ios/TopBarAppearancePresenter.m

+ 3
- 1
lib/ios/TopBarAppearancePresenter.m Bestand weergeven

@@ -36,12 +36,14 @@
36 36
         [self.getAppearance configureWithTransparentBackground];
37 37
         [self.getScrollEdgeAppearance configureWithTransparentBackground];
38 38
     } else if (self.backgroundColor) {
39
+        [self.getAppearance configureWithOpaqueBackground];
40
+        [self.getScrollEdgeAppearance configureWithOpaqueBackground];
39 41
         [self.getAppearance setBackgroundColor:self.backgroundColor];
40 42
         [self.getScrollEdgeAppearance setBackgroundColor:self.backgroundColor];
41 43
     } else if (self.translucent) {
42 44
         [self.getAppearance configureWithDefaultBackground];
43 45
         [self.getScrollEdgeAppearance configureWithDefaultBackground];
44
-    } else {
46
+    }  else {
45 47
         [self.getAppearance configureWithOpaqueBackground];
46 48
         [self.getScrollEdgeAppearance configureWithOpaqueBackground];
47 49
     }