Order by multiple properties using Realm
In RealmSwift we can write multiple properties like this:
let sortProperties = [SortDescriptor(property: "dateStart", ascending: true), SortDescriptor(property: "timeStart", ascending: true)]allShowsByDate = Realm().objects(MyObjectType).sorted(sortProperties)
If you want to use more properties,you can add values of SortDescriptor()
to the array.