Commit d582245
authored
fix(iOS, Tabs): tab screen height when tabs are rendered dynamically (#3425)
## Description
Fixes incorrect tab screen frame, assigned by UIKit when tabs are
rendered dynamically & available space is less that window size.
We enable auto-layout and add constraints so that
`tabBarController.view`'s dimensions match
`RNSBottomTabsHostComponentView`.
Closes
software-mansion/react-native-screens-labs#588.
| before | after |
| --- | --- |
| <video
src="https://github.com/user-attachments/assets/8cd02a27-aa52-46aa-90af-469d2f877887"
/> | <video
src="https://github.com/user-attachments/assets/ccb37d69-a9a4-4dc9-801d-ce8415b2e610"
/> |
| --- | --- |
| <img width="409" height="814" alt="before3425_vh"
src="https://github.com/user-attachments/assets/0e173b56-420c-4bb0-a36a-264e48464921"
/> | <img width="511" height="829" alt="after3425_vh"
src="https://github.com/user-attachments/assets/c042ef0f-7bf3-4f98-88b5-ee1cdf01b9ed"
/> |
We might want to investigate in more detail why we receive the incorrect
frame. I created an issue for this:
software-mansion/react-native-screens-labs#596.
## Changes
- add layout constraints for `tabBarController.view`.
## Test code and steps to reproduce
Run `Test3425`.
## Checklist
- [x] Included code example that can be used to test this change
- [x] Ensured that CI passes1 parent 2381457 commit d582245
File tree
3 files changed
+42
-0
lines changed- apps/src/tests
- ios/bottom-tabs/host
3 files changed
+42
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
0 commit comments