Ch. 4 view controls troubles
I have done the follow along in the book for the window-based application and can't seem to get it to build and run without several errors.
First error:
@interface HelloWorldViewController : HelloWorldViewController.m (expected identifier, cannot find interface declaration for HelloWorld) this is in viewController.h file
Second error:
#import "HelloWorldViewController.h"
@implementation HelloWorldViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{(hehelloworld cannot use super because it is in root class
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
these are the first two errors there are more but I will post them in a few.
Thanks in advance for the help. Also I am using Xcode 4.1 for this book and some of the examples are different formats with this version
|