I have a NSManagedObject my own class (BPMonitor) for my Entity - BPMonitor:
import UIKit
import CoreData
@objc(BPMonitor)
class BPMonitor: NSManagedObject {
@NSManaged var sisPress: String
@NSManaged var diaPress: String
@NSManaged var hbPress: String
@NSManaged var datePress: NSDate
}
In code I receive data from Core Data to array:
var results:[BPMonitor]=[]
...
...
How I can sort my array for field datePress (NSDate) in descending order?