浏览代码

Fix white topBar on pop with swipe gesture (#6069)

This commit fix topBar background wrong color when swiping pop gesture on iOS 13 and above.

Addresses #6055
Yogev Ben David 4 年前
父节点
当前提交
62273214f0
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      lib/ios/TopBarAppearancePresenter.m
  2. 1
    1
      playground/ios/NavigationTests/RNNStackPresenterTest.m

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

@@ -19,7 +19,7 @@
19 19
 }
20 20
 
21 21
 - (void)applyOptionsBeforePopping:(RNNTopBarOptions *)options {
22
-    [self setBackgroundColor:[options.background.color getWithDefaultValue:nil]];
22
+
23 23
 }
24 24
 
25 25
 - (void)setTranslucent:(BOOL)translucent {

+ 1
- 1
playground/ios/NavigationTests/RNNStackPresenterTest.m 查看文件

@@ -42,7 +42,7 @@
42 42
 	_options.topBar.background.color = [[Color alloc] initWithValue:[UIColor redColor]];
43 43
 	
44 44
 	[self.uut applyOptionsBeforePopping:self.options];
45
-	XCTAssertTrue([_boundViewController.childViewControllers.lastObject.navigationItem.standardAppearance.backgroundColor isEqual:[UIColor redColor]]);
45
+	XCTAssertFalse([_boundViewController.childViewControllers.lastObject.navigationItem.standardAppearance.backgroundColor isEqual:[UIColor redColor]]);
46 46
 }
47 47
 
48 48
 - (void)testApplyOptionsShouldSetLargeTitleVisible {