Here’s how to get at the main storyboard from inside your view controller.
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:
[[NSBundle mainBundle].infoDictionary objectForKey:@"UIMainStoryboardFile"]
Most of the time you can just use self.storyboard. But if you are in a view controller that was not created by a storyboard, then self.storyboard will be nil.Comments closed