Skip to content

STRUCT

ViewControllerDescription.KindIdentifier

public struct KindIdentifier: Hashable

Describes the UIViewController type that backs the ViewControllerDescription in a way that is Equatable and Hashable. When implementing view controller updating and diffing, you can use this type to identify if the backing view controller type changed.

Methods

init(_:)

public init<VC: UIViewController>(_ kind: VC.Type)

Creates a new kind for the given view controller type.

canUpdate(viewController:)

public func canUpdate(viewController: UIViewController) -> Bool

If the given view controller is of the correct type to be updated by this view controller description.

If your view controller type can change between updates, call this method before invoking update(viewController:).

hash(into:)

public func hash(into hasher: inout Hasher)

Parameters

Name Description
hasher The hasher to use when combining the components of this instance.

==(_:_:)

public static func == (lhs: Self, rhs: Self) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.