No, there is no way to do what you are looking for.
If you could tell us why you need it, maybe someone can give you directions for an alternative.
Edited by:
If you really want to do this the way you can use try / catch , something like this should work:
@try
{
[self performSegueWithIdentifier:@"first" sender:self];
}
@catch (NSException *exception)
{
if ([exception.name isEqualToString:@"NSInvalidArgumentException"])
{
NSLog(@"NSInvalidArgumentException");
[self performSegueWithIdentifier:@"second" sender:self];
}
}
source
share