NSNumber predicate in iOS swift
Problem:
I want to filter NsNumber entries in core data. So i tried to use predicate with %@ but it crashes the app.
How to solve that?
Solution:
let datePredicate = NSPredicate(format: "date.integerValue <= %@",selectedDate)
let filtered = dataArray.filtered(using: datePredicate)
It will works fine
Comments
Post a Comment