Commit 5f41a62
Fix PaywallView styling timing issue with forced layout updates
Fixes an issue where styles applied to RevenueCatUI.Paywall component
were not being applied immediately. The problem was that the paywall's
native view setup was deferred until layoutSubviews, causing a timing
issue with React Native's style application.
This solution preserves the original view hierarchy timing while forcing
immediate layout updates when React Native applies style changes.
Changes:
- Override reactSetFrame, setBounds, and setFrame methods
- Call setNeedsLayout + layoutIfNeeded to force immediate layout updates
- Preserve original view controller hierarchy setup timing
This approach is safer than restructuring the view hierarchy timing as it:
- Maintains SwiftUI environment context
- Preserves safe area and layout guide behavior
- Works with React Native's layout system
Fixes #1366
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent a718688 commit 5f41a62
1 file changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
47 | 66 | | |
48 | 67 | | |
49 | 68 | | |
| |||
0 commit comments