Contents

XCTKVOExpectation.Handler

A custom handler to call when observing a KVO change for a specified key path.

Declaration

typealias Handler = @Sendable (Any, [AnyHashable : Any]) -> Bool

Parameters

  • observedObject:

    The observed object, which helps to avoid block-capture issues.

  • change:

    The KVO change dictionary.

Return Value

Your custom handler returns true if the system fulfills the expectation after the observed change; otherwise, false.

See Also

Custom KVO evaluation