Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. let appDelegate = UIApplication.shared.delegate as! AppDelegate
  2. let context = appDelegate.persistentContainer.viewContext
  3.  
  4. let entity = NSEntityDescription.entity(forEntityName: "HospitalLocations", in: context)
  5. let newHospital = NSManagedObject(entity: entity!, insertInto: context)
  6.  
  7. newHospital.setValue("Livanta", forKey: "hospital_name")
  8. newHospital.setValue("Maryland", forKey: "hospital_state")
  9. newHospital.setValue(39.051599499999995, forKey: "hospital_lat")
  10. newHospital.setValue(-76.49555090000001, forKey: "hospital_lng")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement