如何从本机(Swift)代码打开反应本机特定屏幕?

时间:2019-08-10 07:09:16

标签: swift react-native

我希望你一切都好。

我曾经设法从react-native打开本机屏幕,但现在想从native打开本机的特定屏幕。

有什么主意吗?

尝试过

let jsCodeLocation = RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackResource: nil)
let rootView = RCTRootView(bundleURL:jsCodeLocation as URL?, moduleName: "myapp", initialProperties: nil, launchOptions:nil)

let rootViewController = UIViewController()

rootViewController.view = rootView
self.navigationController?.pushViewController(rootViewController, animated: true)

0 个答案:

没有答案