From 2b7cb46ddb42daba5b040c774f38efcb272ca977 Mon Sep 17 00:00:00 2001 From: Adam Comella Date: Thu, 17 Aug 2017 23:36:58 -0700 Subject: [PATCH] iOS: Fix registration for UIContentSizeCategoryDidChangeNotification Summary: On an iPhone running iOS 10.3.3, I'm not seeing the UIContentSizeCategoryDidChangeNotification fire when changing the system's font scale setting. Registering for the event on `nil` instead of on the application object fixes the issue. **Test Plan** Verified that text in an RN app changes size when you change the system's font scale setting (Settings -> General -> Accessibility -> Larger Text). By default, RN text is supposed to scale with the system setting. Adam Comella Microsoft Corp. Closes https://github.com/facebook/react-native/pull/15522 Differential Revision: D5657449 Pulled By: shergin fbshipit-source-id: d7a6a730c5cd6eb3833274a1f2029663ad3a7ad2 --- React/Modules/RCTAccessibilityManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Modules/RCTAccessibilityManager.m b/React/Modules/RCTAccessibilityManager.m index a7633a64da..409e9792f9 100644 --- a/React/Modules/RCTAccessibilityManager.m +++ b/React/Modules/RCTAccessibilityManager.m @@ -65,7 +65,7 @@ RCT_EXPORT_MODULE() [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveNewContentSizeCategory:) name:UIContentSizeCategoryDidChangeNotification - object:RCTSharedApplication()]; + object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveNewVoiceOverStatus:)