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
NSFetchRequestDeclaration
Swift
@objc public var block: (_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) -> Void { get } -
Initializes a
CSTweakclause with a closure where theNSFetchRequestmay 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 asCSListMonitors) may keepCSFetchClauses 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
blockthe block to customize the
NSFetchRequest
View on GitHub
CSTweak Class Reference