Last active
May 11, 2016 08:47
-
-
Save m1entus/e1339671209efd86cd947308a474efe4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct CoreDataContextObserverState : OptionSetType { | |
static public let Inserted: ContextWatcher.CoreDataContextObserverState | |
static public let Updated: ContextWatcher.CoreDataContextObserverState | |
static public let Deleted: ContextWatcher.CoreDataContextObserverState | |
static public let Refreshed: ContextWatcher.CoreDataContextObserverState | |
static public let All: CoreDataContextObserverState | |
} | |
public typealias CoreDataContextObserverCompletionBlock = (NSManagedObject, CoreDataContextObserverState) -> () | |
public class CoreDataContextObserver { | |
public var enabled: Bool | |
private(set) var context: NSManagedObjectContext | |
public init(context: NSManagedObjectContext) | |
public func observeObject(object: NSManagedObject, state: CoreDataContextObserverState = default, completionBlock: CoreDataContextObserverCompletionBlock) | |
public func unobserveObject(object: NSManagedObject, forState state: CoreDataContextObserverState = default) | |
public func unobserveAllObjects() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment