sortedArrayWithOptions method

NSArray sortedArrayWithOptions(
  1. int opts, {
  2. required ObjCBlock<Long Function(Pointer<ObjCObjectImpl>, Pointer<ObjCObjectImpl>)> usingComparator,
})

sortedArrayWithOptions:usingComparator:

Implementation

NSArray sortedArrayWithOptions(
  int opts, {
  required objc.ObjCBlock<
    ffi.Long Function(
      ffi.Pointer<objc.ObjCObjectImpl>,
      ffi.Pointer<objc.ObjCObjectImpl>,
    )
  >
  usingComparator,
}) {
  objc.checkOsVersionInternal(
    'NSArray.sortedArrayWithOptions:usingComparator:',
    iOS: (false, (4, 0, 0)),
    macOS: (false, (10, 6, 0)),
  );
  final $ret = _objc_msgSend_1x5ew3h(
    object$.ref.pointer,
    _sel_sortedArrayWithOptions_usingComparator_,
    opts,
    usingComparator.ref.pointer,
  );
  return NSArray.fromPointer($ret, retain: true, release: true);
}