Here is an example.
class Person: Object {
dynamic var id
dynamic var name
}
let sortedPeople = realm.objects(Person).sorted("id")
let Dave = realm.objects(Person).filter("id=5")
I need to find out about this because I have a UITableView that is set up for sorted people, but I need to save the last visible visible row. The scale of sortedPeople changes frequently. So, if I can find out the index in sorted people where the person is, I can create NSIndexPath and scroll to that line.
source
share