---
title: "Get segue identifiers of viewController in ios"  
description: "Get segue identifiers of viewController in ios"  
author: "Pravesh Singh"  
published: 2014-11-11  
updated: 2014-11-12  
canonical: https://www.mindstick.com/forum/2559/get-segue-identifiers-of-viewcontroller-in-ios  
category: "iphone"  
tags: ["ios", "objective c"]  
reading_time: 1 minute  

---

# Get segue identifiers of viewController in ios

Is there a way to get all segue identifiers for VC ?

Or just to know has the VC segue with identifier?

## Replies

### Reply by Samuel Fernandes

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];    }}
```


---

Original Source: https://www.mindstick.com/forum/2559/get-segue-identifiers-of-viewcontroller-in-ios

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
