In a project (XCode 4, iOS 5, with ARC) I have a subclass of UIView with a boolean property:
// Diagram.h
@interface Diagram : UIView
@property (assign) BOOL flag;
@end
// Diagram.m
@implementation Diagram
@synthesize flag;
...
In the main view controller:
// ViewController.h
@property (nonatomic, strong) IBOutlet Diagram *schema;
...
// ViewController.m
@synthesize schema;
...
schema.flag = NO;
...
The last line causes this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setFlag:]: unrecognized selector sent to instance 0xb07e660'
Any help?
Thank you.
Found it!
Diagram.m was not listed in target > Build Phases > Compile Sources.