Reputation: 3298
I am trying to manually start a view controller using storyboards.
That is written in code as opposed to wiring it up. I tried:
self initWithNibName:(NSString *) bundle:(NSBundle *)
but I am not sure if they are classed as nibs or what they are classed as in storyboards. Any help would be great thanks!
Upvotes: 2
Views: 2084
Reputation: 18507
Sounds like you are looking for this method:
AlertContainerViewController *alertContainerViewController =
[[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:NULL]
instantiateViewControllerWithIdentifier:@"alertContainer"];
You need to give the ViewController object in the Storyboard a unique identifier and specify the subclass. You do both through the Property Inspector.
Upvotes: 6