Other Functions

The following functions are available globally.

  • Ensures that the given block is executed on the main queue.

    Declaration

    Swift

    public func c3_performOnMainQueue(_ block: @escaping ((Void) -> Void))

    Parameters

    block

    The block to execute on the main queue.

  • Prints the given message to stdout if DEBUG is defined and true. Prepends filename, line number and method/function name.

    Declaration

    Swift

    public func c3_logIfDebug(_ message: @autoclosure () -> String, function: String = #function, file: NSString = #file, line: Int = #line)
  • Prints the given message to stdout. Prepends filename, line number, method/function name and WARNING:.

    Declaration

    Swift

    public func c3_warn(_ message: @autoclosure () -> String, function: String = #function, file: NSString = #file, line: Int = #line)