Hello for SwiftUI
This commit is contained in:
parent
14aa6a777b
commit
4e4a92c2a3
5 changed files with 75 additions and 33 deletions
29
ios/Native/Application/UIReactNativeView.swift
Normal file
29
ios/Native/Application/UIReactNativeView.swift
Normal file
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// UIReactNativeView.swift
|
||||
// RNPlayground
|
||||
//
|
||||
// Created by Artur Gurgul on 01/08/2025.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import React
|
||||
import React_RCTAppDelegate
|
||||
import ReactAppDependencyProvider
|
||||
|
||||
|
||||
struct UIReactNativeView: UIViewRepresentable {
|
||||
var factory: RCTReactNativeFactory
|
||||
|
||||
init(_ reactNativeFactory: RCTReactNativeFactory) {
|
||||
factory = reactNativeFactory
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> UIView {
|
||||
return factory.rootViewFactory.view(withModuleName: "RNPlayground")
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIView, context: Context) {
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue