Last active
July 2, 2018 03:10
-
-
Save andrehsouza/5452a42864f4d397ab3666a3e944863c 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
if let appDelegate = UIApplication.shared.delegate as? AppDelegate { | |
let managedContext = appDelegate.persistentContainer.viewContext | |
if let customer: Customer = NSEntityDescription.insertNewObject(forEntityName: "Customer", into: managedContext) as? Customer { | |
customer.name = "Mike" | |
//stuff | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment