30 lines
654 B
Swift
30 lines
654 B
Swift
|
//
|
||
|
// UIReactNativeHostingViewController.swift
|
||
|
// RNPlayground
|
||
|
//
|
||
|
// Created by Artur Gurgul on 01/08/2025.
|
||
|
//
|
||
|
|
||
|
import UIKit
|
||
|
import React
|
||
|
import React_RCTAppDelegate
|
||
|
import ReactAppDependencyProvider
|
||
|
|
||
|
class UIReactNativeHostingViewController: UIViewController {
|
||
|
|
||
|
var factory: RCTReactNativeFactory
|
||
|
|
||
|
init(_ reactNativeFactory: RCTReactNativeFactory) {
|
||
|
self.factory = reactNativeFactory
|
||
|
super.init(nibName: nil, bundle: nil)
|
||
|
}
|
||
|
|
||
|
required init?(coder: NSCoder) {
|
||
|
fatalError("init(coder:) has not been implemented")
|
||
|
}
|
||
|
|
||
|
override func loadView() {
|
||
|
view = factory.rootViewFactory.view(withModuleName: "RNPlayground")
|
||
|
}
|
||
|
}
|