![](/img/trans.png)
[英]How to integrate OpenStreetMap into a react-native project?
[英]how to integrate UINavigationController with React-Native component
在我最近的工作中,我將React-Native組件用作iOS
應用程序的視圖部分。 當我編寫“完整的本機應用程序”時,假設我在視圖上有一個按鈕,單擊它, 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];
}
所以我的問題是:如何在React-Native組件中做到這一點?
this.props.navigator.push({...});
有關更多詳細信息,請參見NavigatorIOS和Navigator 。
我解決了這個問題,解決方案就在這個問題上: https : //github.com/facebook/react-native/issues/3324
哈哈〜
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.