Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Get current controller in react native iOS?

$
0
0

I am using the iOS native framework in the react native app. I want to pass the UIViewController in the SDK parameter when clicking the Button that was created in the JS.

func load() { //**navigate to SDK screen**HKSDKController.load(withMainPage: false, andParentViewController: self)    //HKSDKController.load(withMainPage: false, andParentViewController: UIViewController())}

When I try to pass the “self”, I can’t able to navigate to the SDK controller. How to do that?

Input.js:

load = () => { NativeModules.ViewController.load(); }

I can able to call the load() from js to ViewController. But I can't navigate through view controller to SDK.

In android, there is an option to get CurrentActivity. But what’s the way to pas self and navigate.

final Activity activity = getCurrentActivity();

I want to pass the UIViewController in the SDK parameter(andParentViewController).


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>