The entity is "User" which has 2 attributes(email and password). I want to delete a User with the attribute email = "[email protected]". What do I do? I did this far, but I don't know how to delete with attribute. Which means I need to locate the User first then make the delete.
let appDel:AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
let context:NSManagedObjectContext = appDel.managedObjectContext!
context.deleteObject(User: NSManagedObject)
context.save(nil)
Thank you in advance