https://github.com/felixsfd/fdratingview
https://github.com/felixsfd/fdratingview
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/felixsfd/fdratingview
- Owner: FelixSFD
- License: apache-2.0
- Created: 2016-05-11T18:12:14.000Z (about 10 years ago)
- Default Branch: develop
- Last Pushed: 2017-05-07T08:50:03.000Z (about 9 years ago)
- Last Synced: 2025-06-02T13:57:16.462Z (about 1 year ago)
- Language: Swift
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FDRatingView
## Requirements
`FDRatingView` requires Swift 3.0 and Xcode 8.
## Installation
### CocoaPods
Use `pod 'FDRatingView'` or `pod 'FDRatingView', :git => 'https://github.com/FelixSFD/FDRatingView.git'` to install this pod.
### Manual Installation
Copy the content of the folder `FDRatingView` (except `info.plist`!) to your project.
## Usage
To use `FDRatingView`, you have to import the module:
`import FDRatingView`
Then initialize the Object with one of the available initializers and add the view as subview to an `UIView`.
### Example 1

```swift
let ratingView = FDRatingView(frame: CGRect(32, 32, 16, 16), style: .star, numberOfStars: 5, fillValue: 2.33, color: .red, lineWidth:0.7, spacing:3.0)
view.addSubview(ratingView)
```
### Example 2

```swift
let ratingView = FDRatingView(frame: CGRect(32, 32, 16, 16), style: .star, numberOfStars: 3, fillValue: 3, color: .black)
view.addSubview(ratingView)
```
Use `pod 'FDRatingView', :git => 'https://github.com/FelixSFD/FDRatingView.git'` to install this pod