I feel like I’m missing something obvious here but I’m new to obj-c so maybe it’s just something I’m not aware of.
I’m getting the exception error at runtime…
NSDictionaryI 0x9d384d0> setValue:forUndefinedKey:]: this class is not
key value coding-compliant for the key overObject.’
On the 4th line of this code…
NSDictionary *tempDictionary = [[NSDictionary alloc] init];
Boolean overObjectYES = NO;
Boolean overObjectNo = NO;
[tempDictionary setValue:[NSNumber numberWithBool:overObjectYES] forKey:@"overObject"];
I think this is a combination of using
NSDictionarywhen you meanNSMutableDictionary, and sending the messagesetValuewhensetObjectis generally considered more appropriate. See this question for details:NSDictionary setValue:forKey: — getting "this class is not key value coding-compliant for the key"