Skip to content

Commit 85e0ce4

Browse files
committed
update docs
1 parent 9965b8c commit 85e0ce4

2 files changed

Lines changed: 32 additions & 10 deletions

File tree

guides/GUIDE_FOR_LIBRARY_AUTHORS.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ Controls the color of the navigation header.
523523

524524
### `backTitle` (iOS only)
525525

526-
Allows for controlling the string to be rendered next to back button. By default iOS uses the title of the previous screen.
526+
Allows for controlling the string to be rendered next to back button. For iOS versions prior to 26, the title of the previous screen is used as default.
527527

528528
### `backTitleFontFamily` (iOS only)
529529

@@ -535,6 +535,8 @@ Allows for customizing font size to be used for back button title on iOS.
535535

536536
### `backTitleVisible` (iOS only)
537537

538+
This prop has been **deprecated**. Setting it has no effect as native code related to this prop has been removed. Kept only for backward compatibility. Will be removed in next major release.
539+
538540
Whether the back button title should be visible. Defaults to `true`.
539541

540542
When set to `false` it works as a "kill switch": it enforces `backButtonDisplayMode=minimal` and ignores `backButtonDisplayMode`, `backTitleFontSize`, `backTitleFontFamily`, `disableBackButtonMenu`, and `backTitle` works only for back button menu.
@@ -553,18 +555,28 @@ Controls whether the stack should be in `rtl` or `ltr` form.
553555

554556
### `disableBackButtonMenu` (iOS only)
555557

556-
Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.
558+
Boolean indicating whether to show the menu on longPress of the back button.
557559

558560
### `backButtonDisplayMode` (iOS only)
559561

560-
Enum value indicating display mode of back button. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set. The `backTitleVisible` forces `backButtonDisplayMode: minimal` and omits other values. Read more [#2800](https://github.com/software-mansion/react-native-screens/pull/2800). The other props, under the hood, customize `backButtonItem` which overrides `backButtonDisplayMode`. Read more [#2123](https://github.com/software-mansion/react-native-screens/pull/2123).
562+
Enum value indicating display mode of back button.
561563

562564
Possible options:
563565

564-
- `default` – show given back button previous controller title, system generic or just icon based on available space
565-
- `generic` – show given system generic or just icon based on available space
566+
- `default` – show given back button previous controller title, system generic or just icon based on available space and OS version
567+
- `generic` – show given system generic or just icon based on available space and OS version
566568
- `minimal` – show just an icon
567569

570+
Starting from iOS 26:
571+
- the `title` of the previous screen is not used as back button title,
572+
- `generic` display mode behaves the same as `minimal`.
573+
574+
In order to add text to the back button on iOS 26, use `default` display mode and specify text in `backTitle` property.
575+
576+
On iOS versions prior to 26, using `generic` display mode with `backTitleFontFamily`, `backTitleFontSize`
577+
or `disableBackButtonMenu` property set is not supported due to limitations in the native platform.
578+
In such cases, display mode will fallback to `default`.
579+
568580
### `headerLeftBarButtonItems` / `headerRightBarButtonsItems` (iOS only)
569581

570582
An array of objects describing native bar button items to display on the left or right side of the header. Each item can be:

src/types.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
602602
backgroundColor?: ColorValue;
603603
/**
604604
* Title to display in the back button.
605-
* @platform ios.
605+
* @platform ios
606606
*/
607607
backTitle?: string;
608608
/**
@@ -639,18 +639,28 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
639639
*/
640640
direction?: 'rtl' | 'ltr';
641641
/**
642-
* Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.
642+
* Boolean indicating whether to show the menu on longPress of the back button.
643643
* @platform ios
644644
*/
645645
disableBackButtonMenu?: boolean;
646646
/**
647-
* How the back button behaves. It is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` and `backTitleVisible=false` is set.
647+
* How the back button behaves.
648648
* The following values are currently supported (they correspond to [UINavigationItemBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc)):
649649
*
650-
* - `default` – show given back button previous controller title, system generic or just icon based on available space
651-
* - `generic` – show given system generic or just icon based on available space
650+
* - `default` – show given back button previous controller title, system generic or just icon based on available space and OS version
651+
* - `generic` – show given system generic or just icon based on available space and OS version
652652
* - `minimal` – show just an icon
653653
*
654+
* Starting from iOS 26:
655+
* - the `title` of the previous screen is not used as back button title,
656+
* - `generic` display mode behaves the same as `minimal`.
657+
*
658+
* In order to add text to the back button on iOS 26, use `default` display mode and specify text in `backTitle` property.
659+
*
660+
* On iOS versions prior to 26, using `generic` display mode with `backTitleFontFamily`, `backTitleFontSize`
661+
* or `disableBackButtonMenu` property set is not supported due to limitations in the native platform.
662+
* In such cases, display mode will fallback to `default`.
663+
*
654664
* @platform ios
655665
*/
656666
backButtonDisplayMode?: BackButtonDisplayMode;

0 commit comments

Comments
 (0)