これは非常に新人かもしれませんが...
識別子 を使用しViewControllers
て、の 2 つの間にセグエを設定しました。Storyboard
clickBtn
今、私は自分のコードでこのように呼んでいます:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"clickBtn"])
{
if(conditionVerified)
{
SecondViewController *controller = (SecondViewController *)segue.destinationViewController;
[controller setManagedObjectContext:self.managedObjectContext];
}
else
{
// If I enter here I get the error below
}
}
}
キャッチされていない例外 'NSInvalidArgumentException' が原因でアプリを終了しています。理由: '+entityForName: nil は、エンティティ名 'Link' を検索する正当な NSManagedObjectContext パラメータではありません
実際、else ステートメントに入ると、この遷移を実行したくありません。その方法は?