---
title: SWAttributionView
framework: sharedwithyou
role: symbol
role_heading: Class
path: sharedwithyou/swattributionview
---

# SWAttributionView

A view that displays the sender who shares a highlight and provides related actions.

## Declaration

```swift
class SWAttributionView
```

## Mentioned in

Making your app content shareable

## Overview

Overview The SWAttributionView also allows users to get back to the conversation about the SWHighlight content, and other related actions using a highlightMenu. Place an SWAttributionView next to the content represented by its SWHighlight. The SWAttributionView displays the names and avatars within the provided horizontal space. You can constrain this view’s width anchor or set its frame width to control the maximum width of its contents after which truncation may occur. Don’t constrain the view’s height, as the height is dependent on the preferredContentSizeCategory, and the resulting font size. To provide enough vertical space around this view, reference its heightAnchor when using Auto Layout, or its intrinsicContentSize when using manual layout.

## Topics

### Customizing highlights

- [backgroundStyle](sharedwithyou/swattributionview/backgroundstyle-swift.property.md)
- [displayContext](sharedwithyou/swattributionview/displaycontext-swift.property.md)
- [highlight](sharedwithyou/swattributionview/highlight.md)
- [highlightMenu](sharedwithyou/swattributionview/highlightmenu.md)
- [horizontalAlignment](sharedwithyou/swattributionview/horizontalalignment-swift.property.md)
- [menuTitleForHideAction](sharedwithyou/swattributionview/menutitleforhideaction.md)
- [preferredMaxLayoutWidth](sharedwithyou/swattributionview/preferredmaxlayoutwidth.md)
- [supplementalMenu](sharedwithyou/swattributionview/supplementalmenu.md)

### Customizing the view

- [SWAttributionView.BackgroundStyle](sharedwithyou/swattributionview/backgroundstyle-swift.enum.md)
- [SWAttributionView.DisplayContext](sharedwithyou/swattributionview/displaycontext-swift.enum.md)
- [SWAttributionView.HorizontalAlignment](sharedwithyou/swattributionview/horizontalalignment-swift.enum.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)
- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)
