How to know the current storyboard name?

wod picture wod · Jul 18, 2013 · Viewed 16.7k times · Source

I want to know what is the current loaded storyboard,I used the below code but it is still get me the Main storyboard not the current.

//This get me the Main storyboard 
[[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"];

Answer

Xiphias picture Xiphias · Oct 18, 2013

Building on Durican's answer above:

Within a view controller:

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

(The name will not include the ".storyboard" filename extension.)