AView.m
UIButton *btn = [[UIButton alloc]initWithFrame()];
[btn addTarget:self action:@selectior(perpareForSegue:sender:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
//I want to get destinationViewController of segue with identifier"toNextView"
// and then perform the segue
// Difficulties that I encounter is that I have a NSInvalidArgumentException
// Is that mean the view controller doesn't know the existence of the segue?
// I have connected two controller with a segue
}
識別子 "toNextView" を使用してセグエの destinationViewController を取得し、セグエを実行したい 遭遇する問題は、NSInvalidArgumentException があることです ビュー コントローラーがセグエの存在を認識していないということですか? 2 つのコントローラーをセグエで接続しました。