【发布时间】:2018-05-25 17:18:48
【问题描述】:
在 React Native 项目中,我想从 iOS npm 模块访问 Presented Viewcontroller。我可以使用下面的代码访问 RN 项目的 rootviewcontroller
UIViewController *vc = [UIApplication sharedApplication].delegate.window.rootViewController;
但我想要在 RootVC 之上呈现的当前 VC,以便我应该能够在其之上呈现原生 (iOS) UINavigationController。
注意:[UIApplication sharedApplication].delegate.window.rootViewController.presentedViewController 返回零。
【问题讨论】:
标签: ios react-native npm react-native-native-module