We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
No branches or pull requests
//[self.readWriteLock lock];
NSArray *valuesBefore = _mutableValues.copy;
NSArray *keysBefore = _mutableKeys.copy;
[_mutableValues sortUsingComparator:cmptr];
[_mutableKeys sortUsingComparator:^NSComparisonResult(id _Nonnull key1, id _Nonnull key2) {
///find the obj before sort operation with key
NSInteger keyIndexBefore1 = [keysBefore indexOfObject:key1];
id obj1 = valuesBefore[keyIndexBefore1];
NSInteger keyIndexBefore2 = [keysBefore indexOfObject:key2];
id obj2 = valuesBefore[keyIndexBefore2];
///find the objct index in sorted values
NSInteger index1 = [_mutableValues indexOfObject:obj1];;
NSInteger index2 = [_mutableValues indexOfObject:obj2];;
return index2<index1;
}];
//[self.readWriteLock unlock];
}
The text was updated successfully, but these errors were encountered: