Home > DeveloperSection > Forums > Get segue identifiers of viewController in ios
Pravesh Singh

Total Post:411

Points:2881
Posted on    November-11-2014 10:43 PM

 iPhone Ios  Objective C 
Ratings:


 1 Reply(s)
 739  View(s)
Rate this:

Is there a way to get all segue identifiers for VC ?

Or just to know has the VC segue with identifier?



Samuel Fernandes
Samuel Fernandes

Total Post:154

Points:1082
Posted on    November-12-2014 2:48 AM

No, there is no way to do what you are looking for.

If you could tell us why you need this then may be some one can give you directions to an alternative.

Edited:

If you really want to do it this way than 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];

    }

}


Don't want to miss updates? Please click the below button!

Follow MindStick