0

Im creating a new design to my app so I have created a new story board. I need to support the older design for now, but I am designing the upcoming one on the fly. I am reusing some classes and ViewControllers. Is there a way to check the storyboard name in classes? For Example, if 'main' storyboard have the normal left bar button item, however if 'newDesign' do 'x'?

I cant find a way to get the 'UIStoryboard' name?

For example in pseudocode:

if(self.storyboard.name isEqualToString: @"Main"){


}else{

}
DevC
  • 6,982
  • 9
  • 45
  • 80

1 Answers1

0

How about this?

UIStoryboard * storyboard1 = self.storyboard;
NSString *name=[storyboard1 valueForKey:@"name"];

NSLog(@"%@",name);

Another approach is to check the restoration ID of the view controllers. How about that?

hoya21
  • 893
  • 7
  • 24