I am receiving an array of object in the function below, each item in that array contains a value, which is type of CGFloat, I am using this function below, but getting an error at the return line : "Expected identifier"
- (void)setupPieChartWithItems:(NSArray *)items {
NSArray *sortedArray = [items sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
CGFloat first = [(PNPieChartDataItem*)a value];
CGFloat second = [(PNPieChartDataItem*)b value];
return [first > second];
}];
}
Where is the error? Any idea?