{"id":28581245,"url":"https://github.com/yonat/ratingcontrol","last_synced_at":"2026-03-12T14:44:25.688Z","repository":{"id":286288024,"uuid":"960962530","full_name":"yonat/RatingControl","owner":"yonat","description":"⭐️⭐️⭐️⭐️⭐️ Fully customizable star ratings for iOS","archived":false,"fork":false,"pushed_at":"2025-04-20T17:58:12.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T09:55:34.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yonat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["yonat"]}},"created_at":"2025-04-05T13:02:38.000Z","updated_at":"2025-10-14T05:16:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"786a2256-636c-4e9e-a1fe-83e16dd1f9bc","html_url":"https://github.com/yonat/RatingControl","commit_stats":null,"previous_names":["yonat/ratingcontrol"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yonat/RatingControl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FRatingControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FRatingControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FRatingControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FRatingControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yonat","download_url":"https://codeload.github.com/yonat/RatingControl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yonat%2FRatingControl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30428716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T04:16:33.676Z","updated_at":"2026-03-12T14:44:25.667Z","avatar_url":"https://github.com/yonat.png","language":"Swift","funding_links":["https://github.com/sponsors/yonat"],"categories":[],"sub_categories":[],"readme":"# RatingControl\n\n[![Swift Version](https://img.shields.io/badge/swift-5.9-orange.svg)](https://swift.org)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.txt)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/YSRatingControl.svg)](https://img.shields.io/cocoapods/v/YSRatingControl.svg)\n[![Platform](https://img.shields.io/cocoapods/p/YSRatingControl.svg?style=flat)](http://cocoapods.org/pods/YSRatingControl)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n⭐️ Fully customizable star ratings for iOS.\n\n\u003cimg align=\"center\" src=\"Screenshots/RatingControl.png\"\u003e\n\n## Features\n\n* Custom maximum rating value (default: 5)\n* Support for decimal rating values (e.g., 3.5 stars)\n* Custom images\n* Custom size\n* Rate using both tap and pan gestures\n\n## Usage\n\n### Basic Usage\n\nCreate a simple rating control with default settings:\n\n```swift\nlet ratingControl = RatingControl()\nratingControl.value = 3.5 // Set initial rating\n```\n\n### Customization\n\nCustomize appearance and behavior:\n\n```swift\nlet ratingControl = RatingControl()\nratingControl.maxValue = 7 // 7 stars instead of default 5\nratingControl.value = 4.5\nratingControl.spacing = 8 // Increase spacing between stars\nratingControl.tintColor = .systemOrange // Change color\nratingControl.emptyImage = UIImage(systemName: \"heart\")! // Custom empty image\nratingControl.image = UIImage(systemName: \"heart.fill\")! // Custom filled image\n```\n\n### User Interaction\n\nListen for rating changes:\n\n```swift\nratingControl.addTarget(self, action: #selector(ratingChanged), for: .valueChanged)\n\n@objc func ratingChanged(_ sender: RatingControl) {\n    print(\"New rating: \\(sender.value)\")\n}\n```\n\nAlternatively, disable user interaction:\n\n```swift\nratingControl.isUserInteractionEnabled = false\n```\n\n## SwiftUI Support\n\n### RatingView\n\nUse the SwiftUI wrapper to integrate ratings in your SwiftUI views:\n\n```swift\nstruct ContentView: View {\n    @State private var rating: Double = 3.5\n    \n    var body: some View {\n        VStack {\n            // Basic usage\n            RatingView(value: $rating)\n            \n            // Show current value\n            Text(\"Rating: \\(rating, specifier: \"%.1f\")\")\n            \n            // Customization\n            RatingView(value: $rating, maxValue: 7)\n                .emptyImage(UIImage(systemName: \"heart\")!)\n                .filledImage(UIImage(systemName: \"heart.fill\")!)\n                .spacing(10)\n                .imageSize(CGSize(width: 32, height: 32))\n                .accentColor(.red)\n                \n            // Fixed (non-interactive) rating\n            RatingView(value: 4.5)\n                .disabled(true)\n        }\n    }\n}\n```\n\n### Available Modifiers\n\n- `emptyImage(_:)` - Sets the image for empty (unfilled) parts\n- `filledImage(_:)` - Sets the image for filled parts\n- `spacing(_:)` - Sets spacing between images\n- `imageSize(_:)` - Sets custom size for the images\n- Use SwiftUI's `.accentColor(_:)` to change the color\n- Use SwiftUI's `.disabled(_:)` to make it non-interactive\n\n## Installation\n\n### CocoaPods:\n\n```ruby\npod 'YSRatingControl'\n```\n\n### Swift Package Manager:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/yonat/RatingControl\", from: \"1.0.0\")]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonat%2Fratingcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonat%2Fratingcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonat%2Fratingcontrol/lists"}