RLMSortDescriptor

@interface RLMSortDescriptor : NSObject

An RLMSortDescriptor stores a property name and a sort order for use with sortedResultsUsingDescriptors:. It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.

RLMSortDescriptor instances are immutable.

Properties

  • The key path which the sort descriptor orders results by.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull keyPath;
  • Whether the descriptor sorts in ascending or descending order.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL ascending;

Methods