CSTweak
@objc
public final class CSTweak : NSObject, CSFetchClause, CSQueryClause, CSDeleteClause, CoreStoreObjectiveCType
The CSTweak
serves as the Objective-C bridging type for Tweak
.
See also
Tweak
-
The block to customize the
NSFetchRequest
Declaration
Swift
@objc public var block: (_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) -> Void { get }
-
Initializes a
CSTweak
clause with a closure where theNSFetchRequest
may be configured.Important
CSTweak
‘s closure is executed only just before the fetch occurs, so make sure that any values captured by the closure is not prone to race conditions. Also, some utilities (such asCSListMonitor
s) may keepCSFetchClause
s in memory and may thus introduce retain cycles if reference captures are not handled properly.Declaration
Swift
@objc public convenience init(block: @escaping (_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) -> Void)
Parameters
block
the block to customize the
NSFetchRequest