-
-
Notifications
You must be signed in to change notification settings - Fork 597
fix(iOS, Stack): delay setting navigation bar visibility to mitigate bar button bug on iOS 26 #3422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kkafar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nitpick
ios/RNSScreenStackHeaderConfig.mm
Outdated
| navitem.title = config.title; | ||
|
|
||
| // Setting navigation bar visibility is split to mitigate iOS 26 bug with bar button items. | ||
| [navctr setNavigationBarHidden:shouldHide animated:animated]; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
53ffd95 to
19f51d8
Compare
kkafar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job ✅
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.
before3422.mov
after3422.mov
Closes react-navigation/react-navigation#12844.
Closes https://github.com/software-mansion/react-native-screens-labs/issues/560.
Changes
Test code and steps to reproduce
Run
Test3422.Checklist