daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @objc func mergeContext(notification: Notification) {
  2.         let sender = notification.managedObjectContext
  3.  
  4.         if sender != mainThreadManagedObjectContext {
  5.             mainThreadManagedObjectContext.performAndWait {
  6.                 [unowned self] in
  7.  
  8.            self.mainThreadManagedObjectContext.mergeChanges(fromContextDidSave: notification)
  9.             }
  10.         }
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top