diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index 2db1bc9419386b..8bc31ee03e6e91 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -240,6 +240,10 @@ @implementation RCTUIManager - (void)didReceiveNewContentSizeMultiplier { + // Report the event across the bridge. + [_bridge.eventDispatcher sendDeviceEventWithName:@"didUpdateContentSizeMultiplier" + body:@([_bridge.accessibilityManager multiplier])]; + dispatch_async(RCTGetUIManagerQueue(), ^{ [[NSNotificationCenter defaultCenter] postNotificationName:RCTUIManagerWillUpdateViewsDueToContentSizeMultiplierChangeNotification object:self]; @@ -1565,6 +1569,11 @@ static void RCTMeasureLayout(RCTShadowView *view, }]; } +RCT_EXPORT_METHOD(getContentSizeMultiplier:(nonnull RCTResponseSenderBlock)callback) +{ + callback(@[@(_bridge.accessibilityManager.multiplier)]); +} + - (void)rootViewForReactTag:(NSNumber *)reactTag withCompletion:(void (^)(UIView *view))completion { RCTAssertMainQueue();