Using button created from SwiftUI in ReactNative

This commit is contained in:
Artur Gurgul 2025-08-03 10:01:13 +02:00
parent 97fb795866
commit 41081b5084
7 changed files with 52 additions and 1 deletions

View file

@ -0,0 +1,21 @@
//
// BaseButtonManager.swift
// RNPlayground
//
// Created by Artur Gurgul on 02/08/2025.
//
import Foundation
import React
import SwiftUI
@objc(BaseButtonManager)
class BaseButtonManager: RCTViewManager {
override func view() -> UIView! {
return UIHostingController(rootView: BaseButton()).view
}
override static func requiresMainQueueSetup() -> Bool {
return true
}
}