简体   繁体   English

在混合应用程序中从 react native 视图导航到 ios 视图

[英]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.

相关问题 React-Native iOS - 如何通过按下按钮从 React-Native 视图导航到非 React-Native 视图(本机 iOS 视图控制器)? - React-Native iOS - How can I navigate to a non-React-Native view (native iOS view controller) from a React-Native view with a button press? 从混合应用程序从UIwebview访问iOS本机属性/方法 - Accessing iOS native properties/methods from UIwebview from a hybrid app 如何从React Native组件导航到Native iOS UIViewController - How to Navigate from React Native Component to Native iOS UIViewController iOS本机应用程序升级到混合应用程序 - iOS native app upgrade to hybrid app 如何将混合应用程序集成到ios本机应用程序中? - how to integrate hybrid app into ios native app? 在iOS中的本机视图和混合Web视图之间切换 - Switch between native view and hybrid webview in iOS iOS navite框架视图推送不适用于react-native应用程序 - iOS navite framework views push won't work from react-native app 在混合应用程序中反应Native Gesture Reponder - React Native Gesture Reponder inside hybrid app iOS:导航到未直接与应用程序委托连接的视图控制器 - iOS: navigate to a view controller not directly connected from the app delegate 混合应用程序具有Web视图和本机视图的优缺点是什么? - What are the pro and cons with a hybrid app with both webviews and native views?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM