How do I give an "identifier" to a view controller within my storyboard? How do I give an "identifier" to a view controller within my storyboard? xcode xcode

How do I give an "identifier" to a view controller within my storyboard?


As the Image suggests! Hope it helps!

enter image description here

Then to use it you call:

[self.storyboard instantiateViewControllerWithIdentifier:@"YourViewControllerID"];


Updated for XCode 8 and Swift 3.

instantiateViewControllerWithIdentifier is now instantiateViewController(withIdentifier:).

Setting the storyboard ID:enter image description here


In the identity inspector there is a field Storyboard ID. You could enter the class name here and then use this identifier in instantiateViewControllerWithIdentifier:.