I am trying to call performSegueWithIdentifier from different class which is NSObject class and I am receiving this error:
Terminating app due to uncaught exception
I was having the same issue and I managed to resolve it by using NSNotificationCenter.
In the NSObject class .m file I added:
[[NSNotificationCenter defaultCenter] postNotificationName:@"performsegue"
object:nil];
In the ViewController class .m file -
1.In the -(void) viewDidLoad I added:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(performsegueNotification:)
name:@"performsegue"
object:nil];
2.In the -(void) viewDidUnload I added:
[[NSNotificationCenter defaultCenter] removeObserver:self];
3.Created the method performsegueNotification:
-(void)performsegueNotification:(NSNotification *) notif
{
[self performSegueWithIdentifier: @"PresentView" sender:self];
}