From 83392a9cd9d66ffa1beb181855c63fbe5cf0fdc3 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 8 Jul 2024 06:08:58 -0700 Subject: [PATCH] do not call [super loadView] in RN's UIViewController (#45312) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45312 changelog: [internal] loadview shouldn't call its super method. Even though it isn't broken now, the official docs recommend against it. https://developer.apple.com/documentation/uikit/uiviewcontroller/1621454-loadview Reviewed By: christophpurrer Differential Revision: D59376105 fbshipit-source-id: ee04020c008a3f208aafc79991c6ff24a71b226f --- .../ComponentViews/Modal/RCTFabricModalHostViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm index bc8c2bab4d9..406207de0d0 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm @@ -38,7 +38,7 @@ - (void)loadView { - [super loadView]; + self.view = [UIView new]; [_touchHandler attachToView:self.view]; }