Rating

The rating component is used to represent a score as an exact number.

Rating

Cocoapods class reference view on Github

Using Title String

Day Night

Using Title View

Day Night

Usage

Rating with a title string


                                                
                                                BPKRating(
                                                    title: "Excellent",
                                                    value: 4.5,
                                                    ratingScale: .zeroToFive,
                                                    size: .default,
                                                    subtitle: "1,532 reviews",
                                                    showScale: true
                                                ).accessibilityLabel("Rated Excellent, 4.5 out of 5. Base on 1,532 reviews")

it's a must to have .accessibilityLabel("")

with default parameters


                                                
                                                BPKRating(
                                                    title: "Excellent",
                                                    value: 4.5
                                                )

Rating with a custom title view


                                                
                                                BPKRating(
                                                    value: 4.5,
                                                    ratingScale: .zeroToFive,
                                                    size: .default,
                                                    subtitle: "1,532 reviews",
                                                    showScale: true
                                                ) {
                                                    Image("backpack-logo-horizontal")
                                                        .resizable()
                                                        .frame(width: 110, height: 24)
                                                        .aspectRatio(contentMode: .fit)
                                                }.accessibilityLabel("4.5 out of 5. Base on 1,532 reviews")

it's a must to have .accessibilityLabel("")