How to sort using Realm?
I don't know how to sort using Realm. My current code is. data = realm.objects(WorkoutSet) data = data!.sorted("date") I want to sort date an Int from high numbers to low numbers. The docs need more information and the GitHub link throws a 404 message. You can add an ascending parameter to the sorted method: data = data!.sorted("date", ascending: false) This sorts your WorkoutSet using the date field in descending order. Update With Swift 3 and the latest RealmSwift version this has now changed to: data = data!.sorted(byKeyPath: "date", ascending: false) If you want to evaluate the sort