Realm Swift: always put nil values last in sort
问题 I'm writing an app in Swift 2.2 targeting iOS 8 and using Realm. I allow the user to sort objects based on various optional properties using Results.sorted(_:ascending:) . This works very well for descending sorts but for ascending sorts, nil values are placed first which doesn't look right. Many database systems have a NULLS FIRST/LAST option and with CoreData, it looks like it's possible to subclass NSSortDescriptor. Is there any way to always put nil values last when sorting in Realm? Even