Source

BWToolkit / BWViewController.m

Full commit
//
//  BWViewController.m
//  BWToolkit
//
//  Created by Mike on 03/07/2010.
//  Copyright 2010 Karelia Software. All rights reserved.
//

#import "BWViewController.h"


@implementation BWViewController

- (void)dealloc
{
    [_identifier release];
    [super dealloc];
}

#pragma mark View

- (void)loadView;
{
    [super loadView];
    [self didCustomLoadView];
}

- (void)viewDidLoad; { }

- (void)didCustomLoadView;
{
    // AppKit may have gotten round to implementing -viewDidLoad. If so, no need to call it ourselves.
    if (![NSViewController instancesRespondToSelector:@selector(viewDidLoad)])
    {
        [self viewDidLoad];
    }
}

#pragma mark Properties

@synthesize identifier = _identifier;
@synthesize parentViewController = _parent;

@end


#pragma mark -


@implementation NSViewController (BWViewController)

- (NSString *)identifier { return nil; }

- (void)viewWillAppear:(BOOL)animated; { }
- (void)viewDidAppear:(BOOL)animated; { }
- (void)viewWillDisappear:(BOOL)animated; { }
- (void)viewDidDisappear:(BOOL)animated; { }

- (void)setParentViewController:(BWViewController *)parent; { }

@end