Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func actionOnSwipe() {
- var appDel : AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate
- var context : NSManagedObjectContext = appDel.managedObjectContext!
- var newQuote = NSEntityDescription.insertNewObjectForEntityForName("KeptQuotes", inManagedObjectContext: context) as NSManagedObject
- newQuote.setValue("testQ", forKey: "quote")
- newQuote.setValue("testA", forKey: "author")
- context.save(nil)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement