Type Method

dismantleUIView(_:coordinator:)

Cleans up the presented UIKit view (and coordinator) in anticipation of their removal.

Required. Default implementation provided.

Declaration

static func dismantleUIView(_ uiView: Self.UIViewType, coordinator: Self.Coordinator)

Parameters

nsView

Your custom view object.

coordinator

The custom coordinator instance you use to communicate changes back to SwiftUI. If you do not use a custom coordinator, the system provides a default instance.

Discussion

Use this method to perform additional clean-up work related to your custom view. For example, you might use this method to remove observers or update other parts of your SwiftUI interface.

Default Implementations

UIViewRepresentable Implementations

static func dismantleUIView(Self.UIViewType, coordinator: Self.Coordinator)

Cleans up the presented UIKit view (and coordinator) in anticipation of their removal.