diff --git a/lib/ios/TopBarAppearancePresenter.m b/lib/ios/TopBarAppearancePresenter.m index 0aff707c0a4..64e7d4af888 100644 --- a/lib/ios/TopBarAppearancePresenter.m +++ b/lib/ios/TopBarAppearancePresenter.m @@ -72,8 +72,9 @@ - (void)setLargeTitleAttributes:(RNNLargeTitleOptions *)largeTitleOptions { NSString* fontWeight = [largeTitleOptions.fontWeight getWithDefaultValue:nil]; NSNumber* fontSize = [largeTitleOptions.fontSize getWithDefaultValue:nil]; UIColor* fontColor = [largeTitleOptions.color getWithDefaultValue:nil]; - - self.getAppearance.largeTitleTextAttributes = [RNNFontAttributesCreator createFromDictionary:self.getAppearance.largeTitleTextAttributes fontFamily:fontFamily fontSize:fontSize defaultFontSize:nil fontWeight:fontWeight color:fontColor defaultColor:nil]; + NSDictionary* largeTitleTextAttributes = [RNNFontAttributesCreator createFromDictionary:self.getAppearance.largeTitleTextAttributes fontFamily:fontFamily fontSize:fontSize defaultFontSize:nil fontWeight:fontWeight color:fontColor defaultColor:nil]; + self.getAppearance.largeTitleTextAttributes = largeTitleTextAttributes; + self.getScrollEdgeAppearance.largeTitleTextAttributes = largeTitleTextAttributes; } - (UINavigationBarAppearance *)getAppearance { diff --git a/playground/ios/NavigationTests/RNNRootViewControllerTest.m b/playground/ios/NavigationTests/RNNRootViewControllerTest.m index 27d791137e8..ee511cbd7af 100644 --- a/playground/ios/NavigationTests/RNNRootViewControllerTest.m +++ b/playground/ios/NavigationTests/RNNRootViewControllerTest.m @@ -217,6 +217,7 @@ - (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor { [self.uut viewWillAppear:false]; UIFont* expectedFont = [UIFont fontWithDescriptor:initialFont.fontDescriptor size:topBarTextFontSizeInput.floatValue]; XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); + XCTAssertTrue([self.uut.navigationItem.scrollEdgeAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); } - (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor { @@ -231,6 +232,8 @@ - (void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor { UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1]; XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]); + XCTAssertTrue([self.uut.navigationItem.scrollEdgeAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); + XCTAssertTrue([self.uut.navigationItem.scrollEdgeAppearance.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]); } - (void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor { @@ -258,6 +261,7 @@ - (void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor { [self.uut viewWillAppear:false]; UIFont* expectedFont = [UIFont fontWithName:inputFont size:15]; XCTAssertTrue([self.uut.navigationItem.standardAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); + XCTAssertTrue([self.uut.navigationItem.scrollEdgeAppearance.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]); }