mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Summary: As a follow-up to this other PR #23839, it adds support for other, iOS only, flags into `AccessibilityInfo`. It adds these other 4 methods: * `isBoldTextEnabled()` * `isGrayscaleEnabled()` * `isInvertColorsEnabled()` * `isReduceTransparencyEnabled()` P.S: Android implementation for those methods just return `false` (with `Promise.resolve(false)`) And the corresponding event listeners: * `boldTextChanged` * `grayscaleChanged`, * `invertColorsChanged`, * `reduceTransparencyChanged` Pull Request resolved: https://github.com/facebook/react-native/pull/23913 Differential Revision: D14482214 Pulled By: cpojer fbshipit-source-id: b97725fd12706957d4dad880a97e6b0993738272
36 lines
1.1 KiB
Objective-C
36 lines
1.1 KiB
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <React/RCTBridge.h>
|
|
#import <React/RCTBridgeModule.h>
|
|
|
|
extern NSString *const RCTAccessibilityManagerDidUpdateMultiplierNotification; // posted when multiplier is changed
|
|
|
|
@interface RCTAccessibilityManager : NSObject <RCTBridgeModule>
|
|
|
|
@property (nonatomic, readonly) CGFloat multiplier;
|
|
|
|
/// map from UIKit categories to multipliers
|
|
@property (nonatomic, copy) NSDictionary<NSString *, NSNumber *> *multipliers;
|
|
|
|
@property (nonatomic, assign) BOOL isBoldTextEnabled;
|
|
@property (nonatomic, assign) BOOL isGrayscaleEnabled;
|
|
@property (nonatomic, assign) BOOL isInvertColorsEnabled;
|
|
@property (nonatomic, assign) BOOL isReduceMotionEnabled;
|
|
@property (nonatomic, assign) BOOL isReduceTransparencyEnabled;
|
|
@property (nonatomic, assign) BOOL isVoiceOverEnabled;
|
|
|
|
@end
|
|
|
|
@interface RCTBridge (RCTAccessibilityManager)
|
|
|
|
@property (nonatomic, readonly) RCTAccessibilityManager *accessibilityManager;
|
|
|
|
@end
|