Contents

ornament(attachmentAnchor:contentAlignment:ornament:)

Presents an ornament on hover.

Declaration

nonisolated static func ornament<Content>(attachmentAnchor: OrnamentAttachmentAnchor, contentAlignment: Alignment3D = .center, @ViewBuilder ornament: () -> Content) -> OrnamentHoverEffect<Content> where Self == OrnamentHoverEffect<Content>, Content : View

Parameters

  • attachmentAnchor:

    The positioning anchor that defines the attachment point of the ornament.

  • contentAlignment:

    The alignment of the ornament with its attachment anchor.

  • ornament:

    The content of the ornament.

Discussion

Use this method to show an ornament at the specified position when the view is hovered. The ornament will be shown with the default fade animation.