[英]Navigate from react native view to ios views in a hybrid app
Hi I was wondering if anyone was able to figure out how to navigate from react native view to native ios view in a hybrid app?嗨,我想知道是否有人能够弄清楚如何在混合应用程序中从 react native 视图导航到 native ios 视图? I can't seem to find any good documentation for this.
我似乎找不到任何好的文档。
There is no official API for this in React Native, but you can write some swift/objc code to do it and call it from your React Native code. React Native 中没有用于此的官方 API,但您可以编写一些 swift/objc 代码来执行此操作,并从您的 React Native 代码中调用它。
You can read here about how you can expose functions from swift/objc to React Native.您可以在此处阅读有关如何将 swift/objc 中的函数公开到 React Native 的信息。
Expose your class and method to react native.公开您的类和方法以对本机做出反应。 To navigate from react native view to native view NotificationCenter is called.
要从本机视图导航到本机视图,将调用 NotificationCenter。 example app source code
示例应用程序源代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.