title: NSBatchDeleteRequest with NSPredicate in swift
body: <p>How to delete rows from CoreData using NSBatchDeleteRequest with NSPredicate.</p>
  
  <p>I want to delete the records which are older than 30 days.</p>
  
  <p>I dont want to get all the data in the memory and than compare and delete, I want to use NSBatchDeleteRequest, like we do in NSBatchUpdateRequest.</p>
  
  <p>Here is the code so far I have written</p>
  
  <pre><code>let date = NSDate(); let yesterday = date.dateByAddingTimeInterval(-24*60*60); let predicate = NSPredicate(format: "date &gt; %@", yesterday);
      let fetchRequest = NSFetchRequest(entityName: "Notification");
      let batchDelete = NSBatchDeleteRequest(fetchRequest: fetchRequest)
  </code></pre>
  
  <p>Please give answers in swift</p>