我需要在我的react-native应用程序中的模态中导航
使用新版public class class1
{
public static string value { get; set; } // use the proper type here if it's not a string
public static void emp(string name)
{
.....
this.value = (value that is returned)
}
}
public class class2
{
public static void studen(string division)
{
class1.emp("Hello");
string class2Var = class1.value; // class2Var will now be "Hello"
}
}
,似乎无法做到这一点。我可以创建一个垂直动画来显示下一个场景,这与场景顶部有一个模态不同。
react-native-router-flux
在我的情况下,我需要我的模态有一个透明的颜色背景,所以我将能够看到模态背后的场景。
我这样做的唯一方法是使用来自react-native的组件 <Scene key="login" direction="vertical">
<Scene key="loginModal" component={Login} schema="modal" title="Login"/>
<Scene key="loginModal2" hideNavBar={true} component={Login2} title="Login2"/>
</Scene>
并在其中包含导航,但似乎没有办法定义像这在<Modal>
。
我需要的更多是这样的:
Router
然后,在{/* LoginModal would be a wrapper which can render children */}
<Scene key="login" component={LoginModal}>
<Scene key="loginModal" component={Login} title="Login"/>
<Scene key="loginModal2" hideNavBar={true} component={Login2} title="Login2" panHandlers={null} duration={1}/>
</Scene>
中会呈现如下内容:
LoginModal
有没有办法可以做到这一点?或者你知道有更好的方法来为react-native提供类似的路由系统吗?
感谢。