How to sum the numbers(Int16) of stored core data - Swift 3
问题 I have stored the letters(String), numbers(Int16) and Date(Date) in the core data. And the filter(NSPredicate) succeeded in organizing only the necessary data. I want to get the total sum of the numbers in this core data. Entity Name : Entity Attribute Name : Letter(String), Value(Int16), Date(Date) let context = (UIApplication.shared.delegate as! AppDelegate).managedObjectContext let entityDesc: NSEntityDescription = NSEntityDescription.entity(forEntityName: "Entity", in: context)! let