Created
September 22, 2016 12:03
-
-
Save tad-iizuka/fc5af32806009311a7eb4cceb5f13645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext | |
for obj in self.item { | |
context.delete(obj) | |
} | |
do { | |
try context.save() | |
} catch { | |
print(String(format: "Error %@: %d",#file, #line)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment