Skip to content

Conversation

@kligarski
Copy link
Contributor

@kligarski kligarski commented Nov 26, 2025

Description

Moves setting navigation bar visibility to the end of header configuration (after bar button items are setup) to mitigate bug on iOS 26 with bar button items being set after a delay.

before after
before3422.mov
after3422.mov

Closes react-navigation/react-navigation#12844.
Closes https://github.com/software-mansion/react-native-screens-labs/issues/560.

Changes

  • split setting nav bar visibility and delay it to the end of config (after bar button items)

Test code and steps to reproduce

Run Test3422.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kligarski kligarski marked this pull request as ready for review November 26, 2025 10:54
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick

navitem.title = config.title;

// Setting navigation bar visibility is split to mitigate iOS 26 bug with bar button items.
[navctr setNavigationBarHidden:shouldHide animated:animated];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass explicitly YES here, and NO in the other palce

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might even add assertion in the other place, that the shouldHide == NO, as we expect to return here early, when it is true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kligarski kligarski requested a review from kkafar November 27, 2025 12:10
@kligarski kligarski force-pushed the @kligarski/fix-order-of-header-configuration branch from 53ffd95 to 19f51d8 Compare November 27, 2025 12:13
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ✅

@kligarski kligarski merged commit d419488 into main Nov 27, 2025
6 checks passed
@kligarski kligarski deleted the @kligarski/fix-order-of-header-configuration branch November 27, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants