浏览代码

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 年前
父节点
当前提交
a2bdfacb27
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      lib/ios/TopBarAppearancePresenter.m

+ 3
- 1
lib/ios/TopBarAppearancePresenter.m 查看文件

@@ -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
     }