react-native-screens
react-native-screens copied to clipboard
feat: add screenEdgesDeferringSystemGestures
Description
Adds prop screenEdgesDeferringSystemGestures
on iOS.
This is an addendum to homeIndicatorHidden
introduced in https://github.com/software-mansion/react-native-screens/pull/1267. Setting homeIndicatorHidden
to true
will show the home indicator when the user touches the screen. This is suboptimal for highly interactive apps like games or e-learning content. screenEdgesDeferringSystemGestures
allows us to keep the home indicator hidden. Additionally, we can also 'hide' the control center and notification screen, which further benefits applications that need as much focus on fullscreen content as possible.
Changes
- Adds prop
screenEdgesDeferringSystemGestures
- Introduces
ScreenEdge
option set to allow for fine-grained control that resembles the native API.
Test code and steps to reproduce
Test643.tsx
Checklist
- [x] Included code example that can be used to test this change
- [x] Updated TS types
- [x] Updated documentation:
- [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [x] Ensured that CI passes
Could someone approve the workflows to run again? I'd love to verify if the fabric build issue is fixed. :)
Is there a reason this PR is being hold back?