I seem to be having an issue with iPhone SDK 2.1 in as far as being able to establish a relationship between a ViewController and a View window. In as far as a Cocoa Touch Class, I went forward and added a UIViewController subclass. I made sure that the target is part of the existing project. Right afterwards I added a User Interfaces -> View XIB. Within the UIViewController I have some straight forward code I literally copy/pasted from sample code elsewhere:
EditViewController.h:
@interface EditorViewController : UIViewController <UITextFieldDelegate> {
UITextField *field;
}
@property(nonatomic, retain) IBOutlet UITextField *field;
@end
EditViewController.m
#import "EditorViewController.h"
@implementation EditorViewController
- (BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)dealloc {
[super dealloc];
}
@end
As you can tell, it doesn't do much. Now when I click my new xib, and reference a class identity with EditorViewController, no auto complete happens, which to me implies that it has no such awareness of a EditorViewClass. When I attempt to control+click from the view to File's Owners, I get nada.
What are some of the possible idiosyncrasies in this process that I'm overlooking that's not allowing me to outlet my view to a controller?
How would I also ensure that my User Interface View XIB is associated with the project besides seeing the project name checked off as a Target?