AnyHook
public class AnyHook
Base class, represents a hook to exactly one method.
-
The class this hook is based on.
Declaration
Swift
public let `class`: AnyClass
-
The selector this hook interposes.
Declaration
Swift
public let selector: Selector
-
The current state of the hook.
Declaration
Swift
public internal(set) var state: AnyHook.State { get }
-
The possible task states
See moreDeclaration
Swift
public enum State : Equatable
-
Apply the interpose hook.
Declaration
Swift
@discardableResult public func apply() throws -> AnyHook
-
Revert the interpose hoook.
Declaration
Swift
@discardableResult public func revert() throws -> AnyHook
-
Release the hook block if possible.
Declaration
Swift
public func cleanup()