title: Sorting Array received from Core Data in Swift
body: <p>I have a <code>NSManagedObject</code> my own class (<code>BPMonitor</code>) for my Entity - <code>BPMonitor</code>:</p>
  
  <pre><code>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
  }
  </code></pre>
  
  <p>In code I receive data from Core Data to array:</p>
  
  <pre><code>var results:[BPMonitor]=[]
  ...
  ...
  </code></pre>
  
  <p>How I can sort my array for field <code>datePress</code> (<code>NSDate</code>) in descending order?</p>