<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPInformationRatingItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPInformationRatingItem"
  },
  "title" : "CPInformationRatingItem"
}
-->

# CPInformationRatingItem

A data object that provides rated content for an information template.

```
class CPInformationRatingItem
```

## Overview

`CPInformationRatingItem` provides the ability to display rated content in the rows of an information template. Depending on the template’s layout, the item’s attributes stack vertically or horizontally in the rows. The [`title`](/documentation/CarPlay/CPInformationItem/title) property describes the content, and the [`detail`](/documentation/CarPlay/CPInformationItem/detail) property provides the content. Use the [`rating`](/documentation/CarPlay/CPInformationRatingItem/rating) and [`maximumRating`](/documentation/CarPlay/CPInformationRatingItem/maximumRating) properties to display a rating for the content. For example, you could show a service rating when displaying information about a restaurant or café.

The template manages the visual styling of the rating and maximum rating.

## Topics

### Creating a Rating Item

[`init(rating: NSNumber?, maximumRating: NSNumber?, title: String?, detail: String?)`](/documentation/CarPlay/CPInformationRatingItem/init(rating:maximumRating:title:detail:))

Creates a rating item with a current and a maximum rating.

### Accessing the Item’s Attributes

[`var rating: NSNumber?`](/documentation/CarPlay/CPInformationRatingItem/rating)

The current rating that the template displays.

[`var maximumRating: NSNumber?`](/documentation/CarPlay/CPInformationRatingItem/maximumRating)

The maximum rating that the template displays.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`CPInformationItem`](/documentation/CarPlay/CPInformationItem)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)