Skip to content

Commit

Permalink
Introducing -[RCTUIManager shadowViewForReactTag:]
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D5042093

fbshipit-source-id: 7c154b660f51de6d575f3c4a70321415512e92a2
  • Loading branch information
shergin authored and facebook-github-bot committed May 16, 2017
1 parent 98fc437 commit ff42878
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions React/Modules/RCTUIManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ - (UIView *)viewForReactTag:(NSNumber *)reactTag
return _viewRegistry[reactTag];
}

- (RCTShadowView *)shadowViewForReactTag:(NSNumber *)reactTag
{
RCTAssertUIManagerQueue();
return _shadowViewRegistry[reactTag];
}

- (void)setAvailableSize:(CGSize)availableSize forRootView:(UIView *)rootView
{
RCTAssertMainQueue();
Expand Down

0 comments on commit ff42878

Please sign in to comment.