I've created mac apps before, and tried to create a simple app for iOS It just displays Hello world in a label after pressing a button.
For some reason it crashes with a EXC_BAD_ACCESS or SIGABRT error. Is this a xcode problem?
All I did was create a new object, with a custom class that inherits NSObject, (tried to inherit UIViewController also with no luck). The controls are connected correctly . What could I be doing wrong here?
The code and error info: (its really short)
MAObject.h:
MAObject.m:
Error info:
For some reason it crashes with a EXC_BAD_ACCESS or SIGABRT error. Is this a xcode problem?
All I did was create a new object, with a custom class that inherits NSObject, (tried to inherit UIViewController also with no luck). The controls are connected correctly . What could I be doing wrong here?
The code and error info: (its really short)
MAObject.h:
Code:
#import <Foundation/Foundation.h>
@interface MAObject : NSObject {
IBOutlet UILabel *displayText
}
-(IBAction)helloWorld:(id)sender;
MAObject.m:
Code:
#import "MAObject.h"
- (IBAction)helloWorld:(id)sender{
[displayText setText:@"Hello World"];
}
Error info:
Code:
[__NSCFString helloWorld:]: unrecognized selector sent to instance 0x6842010
2012-10-18 02:54:19.686 TestApp[33418:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString helloWorld:]: unrecognized selector sent to instance 0x6842010'