How do I add a public boolean property to my Location model? Example: location.has_lights = YES;
I don't quite understand why I need to retain NSString but the IDE shows me an error when trying to retain a bool.
This code produces a 'EXC_BAD_ACCESS'
RKLocation.h
#import <RestKit/RestKit.h>
@interface RKLocation : RKObject {
NSString *_name;
bool has_lights;
}
@property (nonatomic , retain) NSString *name;
@property (nonatomic) bool has_lights;
@end
RKLocation.m
#import "RKLocation.h"
@implementation RKLocation
@synthesize name = _name;
@synthesize has_lights;
- (void)dealloc {
[_name release];
[super dealloc];
}
@end