我用 UIViewController
包装了一个 react-native 页面,并用导航 Controller 推送它,但是我如何使用 react-native js 代码弹出到 native 页面?
最佳答案
最简单的方法是在您的 AppDelegate
上有一个引用您的 UIViewController
的属性,并有一个 React Native Module 方法 (RCT_EXPORT
)根据您的情况调用 dismissViewController
或 presentViewController
。
我建议阅读这篇讨论结合原生 iOS View 和 React Native 的帖子:Leverage Existing iOS Views with React Native
关于back - 如何从 react native 页面返回 native View Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30626301/