GET SEGUE IDENTIFIERS OF VIEWCONTROLLER IN IOS

Pravesh Singh

Total Post:412

Points:2888
Posted by  Pravesh Singh
 1102  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. Samuel Fernandes

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

        }

    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!