Get segue identifiers of viewController in ios

Total Post:412

Points:2888
 1428  View(s)
Ratings:
Rate this:

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

Or just to know has the VC segue with identifier?

  1. Post:159

    Points:1117
    Re: Get segue identifiers of viewController in ios

    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];
        }
    }

      Modified On Apr-06-2018 05:37:26 AM

Answer