Introducing `-[RCTUIManager shadowViewForReactTag:]`

Reviewed By: javache

Differential Revision: D5042093

fbshipit-source-id: 7c154b660f51de6d575f3c4a70321415512e92a2
This commit is contained in:
Valentin Shergin 2017-05-16 09:39:44 -07:00 committed by Facebook Github Bot
parent 98fc4373fc
commit ff42878a5c
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,11 @@ RCT_EXTERN NSString *const RCTUIManagerRootViewKey;
*/
- (UIView *)viewForReactTag:(NSNumber *)reactTag;
/**
* Gets the shadow view associated with a reactTag.
*/
- (RCTShadowView *)shadowViewForReactTag:(NSNumber *)reactTag;
/**
* Set the available size (`availableSize` property) for a root view.
* This might be used in response to changes in external layout constraints.

View File

@ -409,6 +409,12 @@ BOOL RCTIsUIManagerQueue()
return _viewRegistry[reactTag];
}
- (RCTShadowView *)shadowViewForReactTag:(NSNumber *)reactTag
{
RCTAssertUIManagerQueue();
return _shadowViewRegistry[reactTag];
}
- (void)setAvailableSize:(CGSize)availableSize forRootView:(UIView *)rootView
{
RCTAssertMainQueue();