You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(iOS, SplitView): Add an option for changing number of columns dynamically (#3339)
## Description
Previously, the constructor of UISplitViewController relied on a
predefined number of columns, and we enforced this constraint using
an assert to prevent unexpected runtime behavior when the number of
children changed dynamically.
Inspired by the `expo-router` approach, this PR removes the static
assert and introduces a more dynamic pattern: the `SplitViewHost` now
actively monitors the number of child columns. If the number of children
changes, the entire `UISplitViewController` is remounted to reflect the
updated configuration.
Fixessoftware-mansion/react-native-screens-labs#499
.
## Changes
- Added counters to monitor the number of columns and inspectors
## Screenshots / GIFs
Here you can add screenshots / GIFs documenting your change.
You can add before / after section if you're changing some behavior.
### Before
https://github.com/user-attachments/assets/8474db46-9c87-4523-a6fc-effae0ad8555
### After
https://github.com/user-attachments/assets/7a5522c2-c9c8-4afe-8b1f-a3144f97b140
## Test code and steps to reproduce
Run any example with SplitView and add/remove columns or inspector.
## Checklist
- [x] Included code example that can be used to test this change
- [x] Ensured that CI passes
0 commit comments