Reputation: 197
I am new to react native. I am adding react native in my existing iOS app which is partially in Objective C and Swift. I have added Native Module support, bridging in existing app. I don't know how to open a existing ViewController
in swift from React Native Page.
I have gone through below link: How to go to specific native view controller from react-native code?
But don't know how to present or instantiate ViewController
using RCT_EXPORT_METHOD
, RCT_EXPORT_MODULE
. Like in Android using @ReactMethod
I can easily start new Activity from react native button click. Please help me with how can I open ViewController
from react native page.
Upvotes: 4
Views: 10248
Reputation: 243
Have you tried this one: https://stackoverflow.com/a/46007680/4189507 ?
I was manage to do this in my application. It took me a few weeks to fully integrate react-native with native iOS and android (passing data, events etc. between them).
My current flow:
You can call native swift / objective-c methods from react-native using RCT_EXPORT_METHOD.
Im not sure if this is what you are looking for.
Upvotes: 2