Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @objc func mergeContext(notification: Notification) {
- let sender = notification.managedObjectContext
- if sender != mainThreadManagedObjectContext {
- mainThreadManagedObjectContext.performAndWait {
- [unowned self] in
- self.mainThreadManagedObjectContext.mergeChanges(fromContextDidSave: notification)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement