From 188a66daab59a966cd87a5dcfbf13952b84e50f5 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 30 Jun 2020 10:32:38 -0700 Subject: [PATCH] Fabric: Empty (no-op) `layoutSubviews` method was removed from RCTComponentView. 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 --- .../ComponentViews/View/RCTViewComponentView.mm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index c6503a635e9..dfec3a59937 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -53,18 +53,6 @@ using namespace facebook::react; } } -- (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)) {