I tried following the Stanford iphone development tutorial and I got stuck because my iPhone app is crashing. Help!
Error message
2013-03-03 12:10:39.055 RPN Calculator[2166:11303] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key digitPressed.
Header
import <UIKit/UIKit.h>
@interface CalculatorViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *display;
@end
Implementation
#import "CalculatorViewController.h"
@interface CalculatorViewController ()
@end
@implementation CalculatorViewController
- (IBAction)digitPressed:(UIButton *)sender {
NSString *digit = [sender currentTitle];
NSLog(@"Digit pressed = %@", digit);
}
@end