Commit fd43bcc
fix(ios): add Auto Layout constraints to RNNReactButtonView on iOS 26
On iOS 26 the Liquid Glass navigation bar wraps custom-view bar button
items in several internal layout containers. Without explicit size
constraints the wrapper views can collapse to zero height after a
pop → tab-switch → tab-switch → push cycle, making the React button
invisible.
- Guard all new logic behind @available(iOS 26.0, *) AND a runtime
check for UIDesignRequiresCompatibility (compatibility mode disables
Liquid Glass and uses the legacy view hierarchy)
- Set translatesAutoresizingMaskIntoConstraints = NO
- Add width/height constraints at UILayoutPriorityDefaultHigh
- Update constraints in didMountComponentsWithRootTag: after sizeToFit
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent e4e5049 commit fd43bcc
1 file changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
14 | 30 | | |
15 | 31 | | |
16 | 32 | | |
17 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
18 | 44 | | |
19 | 45 | | |
20 | 46 | | |
21 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
22 | 61 | | |
23 | 62 | | |
24 | 63 | | |
| |||
0 commit comments