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

# init(rating:maximumRating:title:detail:)

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

```
init(rating: NSNumber?, maximumRating: NSNumber?, title: String?, detail: String?)
```

## Parameters

`rating`

A number in the range of 0 to `maximumRating`. The number must be an increment of 0.5.

`maximumRating`

A whole number in the range of 1 to 5 that specifies the maximum rating that the item allows.

`title`

The text that the template displays as the item’s title.

`detail`

The text that the template displays below or beside the title, depending on the template’s layout. See [`CPInformationTemplateLayout`](/documentation/CarPlay/CPInformationTemplateLayout) for more information.

---

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)