Sfoglia il codice sorgente

Fix largeTitle background color on iOS 13 (#6027)

Resolves largeTitle background color from topBar.title.background.color

Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
Yogev Ben David 4 anni fa
parent
commit
979cb6e08f
No account linked to committer's email address

+ 1
- 0
lib/ios/RNNComponentViewController.m Vedi File

@@ -9,6 +9,7 @@
9 9
 	self.extendedLayoutIncludesOpaqueBars = YES;
10 10
     if (@available(iOS 13.0, *)) {
11 11
         self.navigationItem.standardAppearance = [UINavigationBarAppearance new];
12
+        self.navigationItem.scrollEdgeAppearance = [UINavigationBarAppearance new];
12 13
     }
13 14
 	return self;
14 15
 }

+ 8
- 0
lib/ios/TopBarAppearancePresenter.m Vedi File

@@ -34,12 +34,16 @@
34 34
 - (void)updateBackgroundAppearance {
35 35
     if (self.transparent) {
36 36
         [self.getAppearance configureWithTransparentBackground];
37
+        [self.getScrollEdgeAppearance configureWithTransparentBackground];
37 38
     } else if (self.backgroundColor) {
38 39
         [self.getAppearance setBackgroundColor:self.backgroundColor];
40
+        [self.getScrollEdgeAppearance setBackgroundColor:self.backgroundColor];
39 41
     } else if (self.translucent) {
40 42
         [self.getAppearance configureWithDefaultBackground];
43
+        [self.getScrollEdgeAppearance configureWithDefaultBackground];
41 44
     } else {
42 45
         [self.getAppearance configureWithOpaqueBackground];
46
+        [self.getScrollEdgeAppearance configureWithOpaqueBackground];
43 47
     }
44 48
 }
45 49
 
@@ -74,4 +78,8 @@
74 78
     return self.currentNavigationItem.standardAppearance;
75 79
 }
76 80
 
81
+- (UINavigationBarAppearance *)getScrollEdgeAppearance {
82
+    return self.currentNavigationItem.scrollEdgeAppearance;
83
+}
84
+
77 85
 @end