---
title: TipUICollectionViewCell
framework: tipkit
role: symbol
role_heading: Class
path: tipkit/tipuicollectionviewcell
---

# TipUICollectionViewCell

A collection view cell that embeds a tip.

## Declaration

```swift
@MainActor @objc @preconcurrency final class TipUICollectionViewCell
```

## Overview

Overview Use this cell to create a tip you want to display and layout as a UICollectionViewCell. To configure the content and appearance of your cell, use the configureTip(_:arrowEdge:actionHandler:) function and provide a tip along with an optional arrow edge and action handler. Set the background color of your tip view using backgroundColor. Adding or removing TipUICollectionViewCell is done by listening to a tip’s shouldDisplayUpdates or statusUpdates. import TipKit import UIKit

class CatTracksCollectionViewController: UIViewController, UICollectionViewDataSource {     var collectionView: UICollectionView     var catTracksFeatureTip = CatTracksFeatureTip()

override func viewDidLoad() {         super.viewDidLoad()         collectionView.register(TipUICollectionViewCell.self, forCellWithReuseIdentifier: "TipUICollectionViewCell")     }

override func viewDidAppear(_ animated: Bool) {         super.viewDidAppear(animated)

Task { @MainActor in             for await shouldDisplay in catTracksFeatureTip.shouldDisplayUpdates {                 collectionView.reloadData()             }         }     }          func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {         if section == 0 {             return catTracksFeatureTip.shouldDisplay ? 1 : 0         }         return dataStore.numberOfItemsInSection(section - 1)     }

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {         if let indexPath.section == 0, let catTracksTipCell = collectionView.dequeueReusableCell(withReuseIdentifier: "TipUICollectionViewCell", for: indexPath) as? TipUICollectionViewCell {             catTracksTipCell.configureTip(catTracksFeatureTip)             return catTracksTipCell         }     } }

## Topics

### Initializers

- [init(coder:)](tipkit/tipuicollectionviewcell/init(coder:).md)
- [init(frame:)](tipkit/tipuicollectionviewcell/init(frame:).md)

### Instance Properties

- [backgroundColor](tipkit/tipuicollectionviewcell/backgroundcolor.md)
- [backgroundStyle](tipkit/tipuicollectionviewcell/backgroundstyle.md)
- [cornerRadius](tipkit/tipuicollectionviewcell/cornerradius.md)
- [imageSize](tipkit/tipuicollectionviewcell/imagesize.md)
- [imageStyle](tipkit/tipuicollectionviewcell/imagestyle.md)
- [viewStyle](tipkit/tipuicollectionviewcell/viewstyle.md)

### Instance Methods

- [configureTip(_:arrowEdge:actionHandler:)](tipkit/tipuicollectionviewcell/configuretip(_:arrowedge:actionhandler:).md)

## Relationships

### Inherits From

- [UICollectionViewCell](uikit/uicollectionviewcell.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)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.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)

## See Also

### UIKit Views

- [TipUIView](tipkit/tipuiview.md)
- [TipUIPopoverViewController](tipkit/tipuipopoverviewcontroller.md)
- [TipUICollectionReusableView](tipkit/tipuicollectionreusableview.md)
