---
title: "calendarView(_:decorationFor:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicalendarviewdelegate/calendarview(_:decorationfor:)"
---

# calendarView(_:decorationFor:)

Creates a calendar view decoration for the date represented by the date components you provide.

## Declaration

```swift
optional func calendarView(_ calendarView: UICalendarView, decorationFor dateComponents: DateComponents) -> UICalendarView.Decoration?
```

## Parameters

- `calendarView`: The calendar view object requesting the decoration.
- `dateComponents`: Date components that represent the date for the calendar view to display a decoration.

## Return Value

Return Value A calendar view decoration.
