mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Add code to call viewWillLoad/viewDidLoad into loadView
This commit is contained in:
parent
5e5e2bd317
commit
20a59e45b5
2 changed files with 20 additions and 0 deletions
|
@ -88,6 +88,9 @@ APPKIT_EXPORT_CLASS
|
|||
|
||||
- (NSString *)nibName;
|
||||
- (NSBundle *)nibBundle;
|
||||
|
||||
- (void) viewWillLoad;
|
||||
- (void) viewDidLoad;
|
||||
@end
|
||||
|
||||
#endif // OS_API_VERSION
|
||||
|
|
|
@ -73,6 +73,14 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)viewWillLoad
|
||||
{
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
}
|
||||
|
||||
- (void)setRepresentedObject:(id)representedObject
|
||||
{
|
||||
ASSIGN(_representedObject, representedObject);
|
||||
|
@ -124,6 +132,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if ([self respondsToSelector: @selector(viewWillLoad)])
|
||||
{
|
||||
[self viewWillLoad];
|
||||
}
|
||||
|
||||
nib = [[NSNib alloc] initWithNibNamed: [self nibName]
|
||||
bundle: [self nibBundle]];
|
||||
if ((nib != nil) && [nib instantiateNibWithOwner: self
|
||||
|
@ -131,6 +144,10 @@
|
|||
{
|
||||
_vcFlags.nib_is_loaded = YES;
|
||||
// FIXME: Need to resolve possible retain cycles here
|
||||
if ([self respondsToSelector: @selector(viewDidLoad)])
|
||||
{
|
||||
[self viewWillLoad];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue