File tree 2 files changed +18
-10
lines changed
2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 13
13
#import < React/RCTShadowView+Layout.h>
14
14
#import < React/RCTShadowView.h>
15
15
#import < React/RCTUIManager.h>
16
+ #import < React/RCTUIManagerUtils.h>
16
17
#import < React/RCTUIManagerObserverCoordinator.h>
17
18
18
19
#import " RCTTextShadowView.h"
@@ -83,12 +84,15 @@ - (void)handleDidUpdateMultiplierNotification
83
84
{
84
85
CGFloat fontSizeMultiplier = self.bridge .accessibilityManager .multiplier ;
85
86
86
- for (RCTTextShadowView *shadowView in _shadowViews) {
87
- shadowView.textAttributes .fontSizeMultiplier = fontSizeMultiplier;
88
- [shadowView dirtyLayout ];
89
- }
87
+ NSHashTable <RCTTextShadowView *> *shadowViews = _shadowViews;
88
+ RCTExecuteOnUIManagerQueue (^{
89
+ for (RCTTextShadowView *shadowView in shadowViews) {
90
+ shadowView.textAttributes .fontSizeMultiplier = fontSizeMultiplier;
91
+ [shadowView dirtyLayout ];
92
+ }
90
93
91
- [self .bridge.uiManager setNeedsLayout ];
94
+ [self .bridge.uiManager setNeedsLayout ];
95
+ });
92
96
}
93
97
94
98
@end
Original file line number Diff line number Diff line change 16
16
#import < React/RCTShadowView+Layout.h>
17
17
#import < React/RCTShadowView.h>
18
18
#import < React/RCTUIManager.h>
19
+ #import < React/RCTUIManagerUtils.h>
19
20
#import < React/RCTUIManagerObserverCoordinator.h>
20
21
21
22
#import " RCTBaseTextInputShadowView.h"
@@ -109,12 +110,15 @@ - (void)handleDidUpdateMultiplierNotification
109
110
{
110
111
CGFloat fontSizeMultiplier = self.bridge .accessibilityManager .multiplier ;
111
112
112
- for (RCTBaseTextInputShadowView *shadowView in _shadowViews) {
113
- shadowView.textAttributes .fontSizeMultiplier = fontSizeMultiplier;
114
- [shadowView dirtyLayout ];
115
- }
113
+ NSHashTable <RCTBaseTextInputShadowView *> *shadowViews = _shadowViews;
114
+ RCTExecuteOnUIManagerQueue (^{
115
+ for (RCTBaseTextInputShadowView *shadowView in shadowViews) {
116
+ shadowView.textAttributes .fontSizeMultiplier = fontSizeMultiplier;
117
+ [shadowView dirtyLayout ];
118
+ }
116
119
117
- [self .bridge.uiManager setNeedsLayout ];
120
+ [self .bridge.uiManager setNeedsLayout ];
121
+ });
118
122
}
119
123
120
124
@end
You can’t perform that action at this time.
0 commit comments