Running this NSComparator:
NSComparator comparatore = ^NSComparisonResult(NSMutableDictionary *aDictionary, NSMutableDictionary *anotherDictionary) { return [[aDictionary objectForKey:@"Item"] localizedCaseInsensitiveCompare:[anotherDictionary objectForKey:@"Item"]]; }; lista = [listaNonOrdinata sortedArrayUsingComparator:comparatore];
I get this error: incompatible block pointer types initialization 'int (^) (struct NSMutableDictionary *, struct NSMutableDictionary *)', expected by 'NSComparator'
I read about this error on this site and in the official guide, but I did not find a solution.
I tried everything, maybe someone here can help me, or maybe someone knows how to do the same thing differently. Thanks!
source share