Skip to content

Commit

Permalink
Fabric: Empty (no-op) layoutSubviews method was removed from RCTCom…
Browse files Browse the repository at this point in the history
…ponentView.

Summary:
The method does not do anything besides calling a super method. Even if this method does nothing special, overriding it can have negative performance implications.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D22309895

fbshipit-source-id: bd8237d15df20017629223f278b1b6ac628b0cc7
  • Loading branch information
shergin authored and facebook-github-bot committed Jun 30, 2020
1 parent 753fdeb commit 188a66d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ - (void)setContentView:(UIView *)contentView
}
}

- (void)layoutSubviews
{
[super layoutSubviews];
// Consider whether using `updateLayoutMetrics:oldLayoutMetrics`
// isn't more appropriate for your use case. `layoutSubviews` is called
// by UIKit while `updateLayoutMetrics:oldLayoutMetrics` is called
// by React Native Renderer within `CATransaction`.
// If you are calling `setFrame:` or other methods that cause
// `layoutSubviews` to be triggered, `_contentView`'s and `_borderLayout`'s
// frames might get out of sync with `self.bounds`.
}

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
if (UIEdgeInsetsEqualToEdgeInsets(self.hitTestEdgeInsets, UIEdgeInsetsZero)) {
Expand Down

0 comments on commit 188a66d

Please sign in to comment.