-2

あるビューコントローラーから次のビューコントローラーに値を渡すときに、このエラーが発生します。

"unrecognized selector sent to instance 0x1f5ea840"
"'NSInvalidArgumentException', reason: '-[UIViewController setContainerToLocationFromResultVC:]: "

2 番目の VC で強力なプロパティを作成しましたが、Container View を使用するように変更するまではうまく機能しているように見えました。

これが私のコードです:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

if ([[segue identifier] isEqualToString:@"resToContainerSegue"]) {
containerViewController *containerVC= segue.destinationViewController;

containerVC.container_toLocationFromResultVC=self.toLabel.text; // also tried "toLabel.text" but no use.

containerVC.container_fromLocationFromResultVC=self.fromLabel.text;
}
}

さらに具体的に提供する必要がある場合はお知らせください。何かお役に立てば幸いです。前もって感謝します

4

1 に答える 1