Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- let context = appDelegate.persistentContainer.viewContext
- let entity = NSEntityDescription.entity(forEntityName: "HospitalLocations", in: context)
- let newHospital = NSManagedObject(entity: entity!, insertInto: context)
- newHospital.setValue("Livanta", forKey: "hospital_name")
- newHospital.setValue("Maryland", forKey: "hospital_state")
- newHospital.setValue(39.051599499999995, forKey: "hospital_lat")
- newHospital.setValue(-76.49555090000001, forKey: "hospital_lng")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement