[英]how to integrate UINavigationController with React-Native component
In my recent work, I use React-Native component as the view part of an iOS
app. 在我最近的工作中,我将React-Native组件用作iOS
应用程序的视图部分。 When I write "full native app", let's say I have button on the view, I click it and the UINavigationController
would push in a new ViewController
: 当我编写“完整的本机应用程序”时,假设我在视图上有一个按钮,单击它, UINavigationController
会推入一个新的ViewController
:
UIButton *btn=[[UIButton alloc]initWithFrame:CGRectMake(60, 60, 200, 60)];
btn.backgroundColor=[UIColor greenColor];
[btn setTitle:@"btn" forState:UIControlStateNormal];
[btn addTarget:self action:@selector(clickme:) forControlEvents:UIControlEventTouchUpInside];
...
- (void) clickme: (UIButton*) sender{
[self.navController pushViewController:ANOTHER_VIEW_CONTROLLER animated:YES];
}
so my question is: how can I do this in a React-Native Component? 所以我的问题是:如何在React-Native组件中做到这一点?
this.props.navigator.push({...});
有关更多详细信息,请参见NavigatorIOS和Navigator 。
I solve this problem and solution is in this issue: https://github.com/facebook/react-native/issues/3324 我解决了这个问题,解决方案就在这个问题上: https : //github.com/facebook/react-native/issues/3324
lol~ 哈哈〜
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.