File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88#import " RCTDefaultReactNativeFactoryDelegate.h"
99#import < ReactCommon/RCTHost.h>
10+ #import < React/RCTViewController.h>
1011#import " RCTAppSetupUtils.h"
1112#import " RCTDependencyProvider.h"
1213#if USE_THIRD_PARTY_JSC != 1
@@ -28,7 +29,7 @@ - (NSURL *_Nullable)sourceURLForBridge:(nonnull RCTBridge *)bridge
2829
2930- (UIViewController *)createRootViewController
3031{
31- return [UIViewController new ];
32+ return [RCTViewController new ];
3233}
3334
3435- (RCTBridge *)createBridgeWithDelegate : (id <RCTBridgeDelegate>)delegate launchOptions : (NSDictionary *)launchOptions
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ */
7+
8+
9+ #import < UIKit/UIKit.h>
10+
11+ NS_ASSUME_NONNULL_BEGIN
12+
13+ @interface RCTViewController : UIViewController
14+
15+ @end
16+
17+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 1+ //
2+ // RCTViewController.m
3+ // React-Core
4+ //
5+ // Created by Hanno Goedecke on 27.04.26.
6+ //
7+
8+ #import " RCTViewController.h"
9+ #import < React/UIViewController+React.h>
10+
11+ @interface RCTViewController ()
12+
13+ @end
14+
15+ @implementation RCTViewController
16+
17+ - (void )viewDidAppear : (BOOL )animated
18+ {
19+ [super viewDidAppear: animated];
20+ [self reactNotifyViewControllerDidAppear: animated];
21+ }
22+
23+ - (void )viewDidDisappear : (BOOL )animated
24+ {
25+ [super viewDidDisappear: animated];
26+ [self reactNotifyViewControllerDidDisappear: animated];
27+ }
28+
29+ @end
Original file line number Diff line number Diff line change 55 * LICENSE file in the root directory of this source tree.
66 */
77
8- #import < UIKit/UIKit .h>
8+ #import < React/RCTViewController .h>
99
1010@class RCTWrapperViewController;
1111
12- @interface RCTWrapperViewController : UIViewController
12+ @interface RCTWrapperViewController : RCTViewController
1313
1414- (instancetype )initWithContentView : (UIView *)contentView NS_DESIGNATED_INITIALIZER;
1515
You can’t perform that action at this time.
0 commit comments