Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions ios/RNSScreenStackHeaderConfig.mm
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ + (UINavigationBarAppearance *)buildAppearance:(UIViewController *)vc
UIImage *shadowImage = appearance.shadowImage;
// transparent background color
[appearance configureWithTransparentBackground];

if (!config.hideShadow) {
appearance.shadowColor = shadowColor;
appearance.shadowImage = shadowImage;
Expand Down Expand Up @@ -688,11 +688,13 @@ + (void)updateViewController:(UIViewController *)vc
UINavigationBarAppearance *scrollEdgeAppearance =
[[UINavigationBarAppearance alloc] initWithBarAppearance:appearance];
if (config.largeTitleBackgroundColor != nil) {
// Add support for using a fully transparent bar when the backgroundColor is set to transparent.
// Add support for using a fully transparent bar when the backgroundColor is set to transparent.
if (CGColorGetAlpha(config.largeTitleBackgroundColor.CGColor) == 0.) {
// This will also remove the background blur effect in the large title which is otherwise inherited from the standard appearance.
// This will also remove the background blur effect in the large title which is otherwise inherited from the
// standard appearance.
[scrollEdgeAppearance configureWithTransparentBackground];
// This must be set to nil otherwise a default view will be added to the navigation bar background with an opaque background.
// This must be set to nil otherwise a default view will be added to the navigation bar background with an
// opaque background.
scrollEdgeAppearance.backgroundColor = nil;
} else {
scrollEdgeAppearance.backgroundColor = config.largeTitleBackgroundColor;
Expand Down Expand Up @@ -826,12 +828,6 @@ - (void)removeReactSubview:(RNSScreenStackHeaderSubview *)subview
}
RNS_IGNORE_SUPER_CALL_BEGIN

- (void)didUpdateReactSubviews
{
[super didUpdateReactSubviews];
[self updateViewControllerIfNeeded];
}

#ifdef RCT_NEW_ARCH_ENABLED
#pragma mark - Fabric specific

Expand Down Expand Up @@ -1046,6 +1042,11 @@ - (void)updateState:(const facebook::react::State::Shared &)state
#else
#pragma mark - Paper specific

- (void)didUpdateReactSubviews
{
[self updateViewControllerIfNeeded];
}

- (void)didSetProps:(NSArray<NSString *> *)changedProps
{
[super didSetProps:changedProps];
Expand Down
Loading