Skip to content

tarun885/StarRating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarRating

A star rating UI component, similar to the one you can see on the the App Store, when rating an app or on IMDB, when you rate a movie.

Overview

Usage

let starView = StarRating(frame: frame, totalStars: 5, selectedStars: 1)
starView.addTarget(self, action: #selector(starRatingValueChanged(_:)), for: .valueChanged)
view.addSubview(starView)
@objc func starRatingValueChanged(_ sender: StarRating) {
    print("Selected \(sender.selectedStars), out of \(sender.totalStars)")
}

License

StarRating is released under the MIT License.

Author

⭐️ Tarun Jain ⭐️

About

A star rating control for iOS written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published