Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. func actionOnSwipe() {
  2.  
  3. var appDel : AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate
  4. var context : NSManagedObjectContext = appDel.managedObjectContext!
  5.  
  6. var newQuote = NSEntityDescription.insertNewObjectForEntityForName("KeptQuotes", inManagedObjectContext: context) as NSManagedObject
  7. newQuote.setValue("testQ", forKey: "quote")
  8. newQuote.setValue("testA", forKey: "author")
  9.  
  10. context.save(nil)
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement