iOS5 Storyboard UIViewController which init method is called by the storyboard?
UiviewcontrollerIos5StoryboardUiviewcontroller Problem Overview
Which init
method is called by the storyboard for UIViewControllers
added to the storyboard?
Uiviewcontroller Solutions
Solution 1 - Uiviewcontroller
The initializer used is initWithCoder:
- (id)initWithCoder:(NSCoder *)decoder
Then afterwards you will also get an awakeFromNib
message.
Solution 2 - Uiviewcontroller
I believe it is awakeFromNib
Solution 3 - Uiviewcontroller
It is the - (id)initWithCoder:(NSCoder *)decoder
So if you have to do a custom init, let's say using a custom Pager Controller you have to do there like
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
return [self initWithViewControllers:@[self.playerViewController, self.categoriesViewController]
andTitles:@[@"Player",@"Categories"]];
}