added viewDidLoad to CPViewController

This commit is contained in:
Klaas Pieter Annema committed 2010-02-10 12:13:17 +01:00
1 parent 669d18b218
commit 90cd519916
1 file changed
+14 -2
+14 -2
View File
@@ -155,20 +155,32 @@ var CPViewControllerCachedCibs;
if (!_view)
{
var reason = [CPString stringWithFormat:@"View for %@ could not be loaded from Cib or no view specified. \
Override loadView to load the view manually.", self];
var reason = [CPString stringWithFormat:@"View for %@ could not be loaded from Cib or no view specified. Override loadView to load the view manually.", self];
[CPException raise:CPInternalInconsistencyException reason:reason];
}
if ([cibOwner respondsToSelector:@selector(viewControllerDidLoadCib:)])
[cibOwner viewControllerDidLoadCib:self];
[self viewDidLoad];
}
return _view;
}
/*!
This method is called after the view controller has loaded its associated views into memory.
This method is called regardless of whether the views were stored in a nib file or created programmatically in the loadView method.
This method is most commonly used to perform additional initialization steps on views that are loaded from nib files.
*/
- (void)viewDidLoad
{
}
/*!
Manually sets the view that the controller manages.
Setting to nil will cause -loadView to be called on all subsequent calls of -view.