学び始めたばかりなので、気楽に...
目標は、ピッカーで選択した行のテキスト値を取得し、それを別のビューのラベルに表示することです。
現在、文字列値を保存するのに問題があり、すべてがコンパイルおよびロードされますが、2番目のビューのラベルは空白のままです。私を非難してください。
//String taken from selected pickerview line and stored in selectedstring
NSString *string = [NSString stringWithFormat:@"You Selected: %@",[_platforms objectAtIndex:row]];
Selectedstring.text = string;
「次のビュー」ボタンを押します。
- (IBAction)NextView:(id)sender {
SecondView *secondview = [[SecondView alloc]init];
self.SecondViewData = secondview;
SecondViewData.passedValue = Selectedstring.text;
[self presentViewController:secondview animated:YES completion:nil];
そして、次のビューの「viewdidload」領域に次のように表示されます。
label.text = passedValue;