I started my intrepid journey into learning objective-c for ios, and got as far as trying to build my view in the interface builder, when I realized that I can't link up the buttons I'm creating to my File's Owner. I have made sure that my File's owner has my view controller selected, and have tried restarting xcode and the interface builder. Here's the contents of both my .h and .m files:
My CalculatorViewController.h file:
#import <UIKit/UIKit.h>
#import "CalculatorBrain.h"
@interface CalculatorViewController : UIViewController {
IBOutlet UILabel *display;
CalculatorBrain *brain;
}
- (IBAction):digitPressed:(UIButton *)sender;
- (IBAction):operationPressed:(UIButton *)sender;
@end
And the CalculatorViewController.m file:
#import "CalculatorViewController.h"
@implementation CalculatorViewController
- (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.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
In short, every time I click on a button in my Interface Builder View, hold CTRL, and drag the blue line over to "File's Owner," nothing happens. In the tutorial I'm watching (The Stanford Fall 2010 IOS tutorials, lesson 2 - if that helps) shows File's Owner highlighting and working like a champ. Any help would be much appreciated. Thanks!