
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: 'navigation.app',
options: {
topBar: {
visible: true,
title: {
text: 'Your Recipes',
},
searchBar: true,
searchBarPlaceholder: "Search for Recipes",
rightButtons: [
{
id: "add-recipe",
systemItem: "add"
}
]
},
}
}
}
]
}
}
})
After using Navigation.push() and Navigation.pop() the title font weight changes and stays like this.
Yeah, this has been around for some time now. I think this occurs on both platform.
I have the same problem, huge bummer
Same here
I can reproduce this on
"react-native": "0.59.8",
"react-native-navigation": "2.18.5"
For everyone experiencing this:
Hotfixed it for myself by editing this line:
- titleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[fontSize floatValue]];
+ titleTextAttributes[NSFontAttributeName] = [UIFont boldSystemFontOfSize:[fontSize floatValue]];
Create a PR for it, everyone can benefit from it :)
I don't think it's exactly expected behavior to always be bold, and this also only works if you don't use a custom font. If it is I'd be happy to create a PR :)
I think it should inherit from the user set in options, however if user doesn't specify, it should be default to bold? The fact that it's bold initially suggest to me that it should default to bold.
There is no configurable option as of now.
Still an issue on react-native-navigation version 2.21.0
For everyone experiencing this:
Hotfixed it for myself by editing this line:- titleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[fontSize floatValue]]; + titleTextAttributes[NSFontAttributeName] = [UIFont boldSystemFontOfSize:[fontSize floatValue]];
Used https://www.npmjs.com/package/patch-package along with this one
- titleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[fontSize floatValue]];
+ titleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[fontSize floatValue] weight:UIFontWeightBold];
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
NOt stale :(
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
not stale :(
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Most helpful comment
For everyone experiencing this:
Hotfixed it for myself by editing this line:
https://github.com/wix/react-native-navigation/blob/b0c8113243de2043b98442dd485c04b0422aa213/lib/ios/RNNFontAttributesCreator.m#L18