mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-17 23:04:40 +08:00
Deprecated stuff was removed from RCTUIManager
Summary: It was deprecated awhile ago. Reviewed By: javache Differential Revision: D5990505 fbshipit-source-id: 68deefb76fee31a49bfe832e281dc8ee11061cb8
This commit is contained in:
committed by
Facebook Github Bot
parent
c0e9936d8e
commit
4342879c92
@@ -168,26 +168,6 @@ RCT_EXTERN NSString *const RCTUIManagerWillUpdateViewsDueToContentSizeMultiplier
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTUIManager (Deprecated)
|
||||
|
||||
/**
|
||||
* This method is deprecated and will be removed in next releases.
|
||||
* Use `setSize:forView:` or `setIntrinsicContentSize:forView:` instead.
|
||||
* Only frames with `origin` equals {0, 0} are supported.
|
||||
*/
|
||||
- (void)setFrame:(CGRect)frame forView:(UIView *)view
|
||||
__deprecated_msg("Use `setSize:forView:` or `setIntrinsicContentSize:forView:` instead.");
|
||||
|
||||
|
||||
/**
|
||||
* This method is deprecated and will be removed in next releases.
|
||||
* Use `registerRootView:` instead. There is no need to specify `sizeFlexibility` anymore.
|
||||
*/
|
||||
- (void)registerRootView:(UIView *)rootView withSizeFlexibility:(RCTRootViewSizeFlexibility)sizeFlexibility
|
||||
__deprecated_msg("Use `registerRootView:` instead.");
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* This category makes the current RCTUIManager instance available via the
|
||||
* RCTBridge, which is useful for RCTBridgeModules or RCTViewManagers that
|
||||
|
||||
@@ -1534,28 +1534,6 @@ static UIView *_jsResponder;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTUIManager (Deprecated)
|
||||
|
||||
- (void)registerRootView:(UIView *)rootView withSizeFlexibility:(__unused RCTRootViewSizeFlexibility)sizeFlexibility
|
||||
{
|
||||
RCTLogWarn(@"Calling of `[-RCTUIManager registerRootView:withSizeFlexibility:]` which is deprecated.");
|
||||
[self registerRootView:rootView];
|
||||
}
|
||||
|
||||
- (void)setFrame:(CGRect)frame forView:(UIView *)view
|
||||
{
|
||||
RCTLogWarn(@"Calling of `[-RCTUIManager setFrame:forView:]` which is deprecated.");
|
||||
[self setSize:frame.size forView:view];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getContentSizeMultiplier:(nonnull RCTResponseSenderBlock)callback)
|
||||
{
|
||||
RCTLogWarn(@"`getContentSizeMultiplier` is deprecated. Instead, use `PixelRatio.getFontScale()` and listen to the `didUpdateDimensions` event.");
|
||||
callback(@[@(_bridge.accessibilityManager.multiplier)]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTBridge (RCTUIManager)
|
||||
|
||||
- (RCTUIManager *)uiManager
|
||||
|
||||
Reference in New Issue
Block a user