Contents

help(_:)

Adds help text to a view using a string that you provide.

Declaration

nonisolated func help<S>(_ text: S) -> some View where S : StringProtocol

Parameters

  • text:

    The text to use as help.

Discussion

Adding help to a view configures the view’s accessibility hint and its help tag (also called a tooltip) in macOS or visionOS. For more information on using help tags, see Offering help in the Human Interface Guidelines.

Image(systemName: "pin.circle")
    .foregroundColor(pointOfInterest.tintColor)
    .help(pointOfInterest.name)