瀏覽代碼

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
No account linked to committer's email address
共有 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
 }
19
 }
20
 
20
 
21
 - (void)applyOptionsBeforePopping:(RNNTopBarOptions *)options {
21
 - (void)applyOptionsBeforePopping:(RNNTopBarOptions *)options {
22
-    [self setBackgroundColor:[options.background.color getWithDefaultValue:nil]];
22
+
23
 }
23
 }
24
 
24
 
25
 - (void)setTranslucent:(BOOL)translucent {
25
 - (void)setTranslucent:(BOOL)translucent {

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

42
 	_options.topBar.background.color = [[Color alloc] initWithValue:[UIColor redColor]];
42
 	_options.topBar.background.color = [[Color alloc] initWithValue:[UIColor redColor]];
43
 	
43
 	
44
 	[self.uut applyOptionsBeforePopping:self.options];
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
 - (void)testApplyOptionsShouldSetLargeTitleVisible {
48
 - (void)testApplyOptionsShouldSetLargeTitleVisible {