问题
I wrapped a react-native page with a UIViewController
, and pushed it with a navigation controller, but how can I pop to the native page using the react-native js code?
回答1:
The simplest way would be to have a property that references your UIViewController
on your AppDelegate
and have a React Native Module method (RCT_EXPORT
) that calls dismissViewController
or presentViewController
, based on your situation.
I would recommend reading this post discussing combining native iOS Views and React Native here: Leverage Existing iOS Views with React Native
来源:https://stackoverflow.com/questions/30626301/how-can-i-go-back-to-native-view-controller-from-react-native-page