2

I have a base UIViewController I inherit from for some basic content in my app using storyboards.

I instantiate it like this:

BasicContentViewController *targetController = [self.storyboard instantiateViewControllerWithIdentifier:@"ColorCouture"];
        [self.navigationController pushFadeViewController:targetController];

OR

 BasicContentViewController *targetController = [self.storyboard instantiateViewControllerWithIdentifier:@"Hospitality"];
        [self.navigationController pushFadeViewController:targetController];

Is there a way for me to check the Identifier I used to instantiate the UIViewControllers?

I want to make sure I am not pushing more than 1 of each of these controller onto my UIViewController stack

jscs
  • 63,694
  • 13
  • 151
  • 195
Slee
  • 27,498
  • 52
  • 145
  • 243
  • I'm not sure what you're asking. You do have the identifiers, since you use them to instantiate your view controllers. What exactly are do you want to check? – TotoroTotoro Nov 27 '13 at 00:46
  • 1
    It [appears](http://stackoverflow.com/questions/13708660/programmatically-get-a-storyboard-id) the answer is no. – FluffulousChimp Nov 27 '13 at 03:29
  • actually, if you read down further you can use restorationId, which works perfectly for me. – Slee Nov 27 '13 at 11:38

1 Answers1

0

This question solves my problem for me:

Programmatically get a Storyboard ID?

I am just using the restorationId instead, works perfectly.

Community
  • 1
  • 1
Slee
  • 27,498
  • 52
  • 145
  • 243