File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1313#import < React/RCTShadowView+Layout.h>
1414#import < React/RCTShadowView.h>
1515#import < React/RCTUIManager.h>
16+ #import < React/RCTUIManagerUtils.h>
1617#import < React/RCTUIManagerObserverCoordinator.h>
1718
1819#import " RCTTextShadowView.h"
@@ -83,12 +84,15 @@ - (void)handleDidUpdateMultiplierNotification
8384{
8485 CGFloat fontSizeMultiplier = self.bridge .accessibilityManager .multiplier ;
8586
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+ }
9093
91- [self .bridge.uiManager setNeedsLayout ];
94+ [self .bridge.uiManager setNeedsLayout ];
95+ });
9296}
9397
9498@end
Original file line number Diff line number Diff line change 1616#import < React/RCTShadowView+Layout.h>
1717#import < React/RCTShadowView.h>
1818#import < React/RCTUIManager.h>
19+ #import < React/RCTUIManagerUtils.h>
1920#import < React/RCTUIManagerObserverCoordinator.h>
2021
2122#import " RCTBaseTextInputShadowView.h"
@@ -109,12 +110,15 @@ - (void)handleDidUpdateMultiplierNotification
109110{
110111 CGFloat fontSizeMultiplier = self.bridge .accessibilityManager .multiplier ;
111112
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+ }
116119
117- [self .bridge.uiManager setNeedsLayout ];
120+ [self .bridge.uiManager setNeedsLayout ];
121+ });
118122}
119123
120124@end
You can’t perform that action at this time.
0 commit comments