CoreData (NSPredicate)
-
We need to filter Baz and show only those cells that were altered less than a minute ago.
When the cell is updated, I'm changing her parameter.
mapPoint["lastUpdate"] = NSDate()
Tell me how to do NSPredicate.
let fetchRequest = NSFetchRequest(entityName: "MapPoint") let startInterval = NSDate(timeIntervalSinceNow: -60).timeIntervalSince1970
fetchRequest.predicate = NSPredicate(format:"lastUpdate > %@", startInterval)
That way doesn't work. ♪ ♪
-
You're comparing.
NSDate
cNSTimeInterval
(i mean.)Double
)Either keep it.
NSTimeInterval
orNSPredicate
compare dates.