価格フィールドに基づいてNSMutableArray
ofをソートしようとしています。NSMutableDictionary
NSString* priceComparator(NSMutableDictionary *obj1, NSMutableDictionary *obj2, void *context){
return @"just for test for the moment";
}
//In other function
arrayProduct = (NSMutableArray*)[arrayProduct sortedArrayUsingFunction:priceComparator context:nil];//arrayProduct is NSMutableArray containing NSDictionarys
上記のステートメントで、修正したい次の警告が表示されます。
Incompatible pointer types sending 'NSString*(NSMutableDictionary *__strong,NSMutableDictionary *__strong,void*)' to parameter of type 'NSInteger (*)(__strong id, __strong id, void*)'