Skip to content

Commit

Permalink
reactSetInheritedBackgroundColor was removed from RCTView
Browse files Browse the repository at this point in the history
Summary:
Now setting explicit backgroundColor style is required for Views with background shadow,
otherwise the shadow will be generated based on content of the view (which is expected behaviour).

Reviewed By: mmmulani

Differential Revision: D6582587

fbshipit-source-id: 0514cb3c57bad17d2af40810b0e0f7ddc96a2c31
  • Loading branch information
shergin authored and facebook-github-bot committed Dec 18, 2017
1 parent c01a171 commit b8e60a3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions React/Views/RCTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,6 @@ static BOOL RCTLayerHasShadow(CALayer *layer)
return layer.shadowOpacity * CGColorGetAlpha(layer.shadowColor) > 0;
}

- (void)reactSetInheritedBackgroundColor:(UIColor *)inheritedBackgroundColor
{
// Inherit background color if a shadow has been set, as an optimization
if (RCTLayerHasShadow(self.layer)) {
self.backgroundColor = inheritedBackgroundColor;
}
}

static void RCTUpdateShadowPathForView(RCTView *view)
{
if (RCTLayerHasShadow(view.layer)) {
Expand Down

0 comments on commit b8e60a3

Please sign in to comment.