I'm trying to compare the string changes in core data. I add observer to NSArrayController and it working fine the problem is when I try to compare the string changes. Here is my code:
- (void)mocDidChangeNotification:(NSNotification *)notification
{
NSDictionary *dic = [[notification userInfo] valueForKey:NSUpdatedObjectsKey];
NSString *stringChange = [dic valueForKey:@"category"];
if ([stringChange isEqualToString:@"rock"])
{
NSLog(@"the String change");
}
}
if check the value of stringChange I get this output in console:
po stringChange
{(
rock
)}
My question to you guys is how can I get the string value to compare it?
I'll really appreciate your help