Permalink
Browse files

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 #15522

Differential Revision: D5657449

Pulled By: shergin

fbshipit-source-id: d7a6a730c5cd6eb3833274a1f2029663ad3a7ad2
  • Loading branch information...
rigdern authored and facebook-github-bot committed Aug 18, 2017
1 parent 609ee65 commit 2b7cb46ddb42daba5b040c774f38efcb272ca977
Showing with 1 addition and 1 deletion.
  1. +1 −1 React/Modules/RCTAccessibilityManager.m
@@ -65,7 +65,7 @@ - (instancetype)init
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveNewContentSizeCategory:)
name:UIContentSizeCategoryDidChangeNotification
object:RCTSharedApplication()];
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didReceiveNewVoiceOverStatus:)

0 comments on commit 2b7cb46

Please sign in to comment.