Skip to content

Instantly share code, notes, and snippets.

@juliantejera
Created April 8, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliantejera/e8e681ed9b539bc8f0d1ddd608ef97bc to your computer and use it in GitHub Desktop.
Save juliantejera/e8e681ed9b539bc8f0d1ddd608ef97bc to your computer and use it in GitHub Desktop.
let context = CoreDataManager.sharedInstance.managedObjectContext
let product = Product(context: context)
// modificas el producto como deseas
func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
CoreDataManager.sharedInstance.managedObjectContext.rollback()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment