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 the NSFetchRequest 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 as CSListMonitors) may keep CSFetchClauses 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