CocoaPods trunk is moving to be read-only. Read more on the blog, there are 4 months to go.

UIRating 1.0.1

UIRating 1.0.1

Maintained by shadowofarman.



UIRating 1.0.1

UIRating

A customizable rating View written in Swift.

Supported Platforms Swift Version Documentation Travis Build GitHub license

Features

  • Super easy and simple to implement.
  • Drag through to rate.
  • Allow half rating.
  • Customizable icons.
  • Customizable option to rate from.

Quick Start

UIRating is available for installation using the Cocoa dependency manager CocoaPods. Alternatively, you can simply copy the UIRating.swift file into your Xcode project.

# CocoaPods
pod "UIRating", "~> 1.0.1"

Usage

The sample project in the example folder provides an example of how to integrate UIRating, otherwise you can follow these steps.

Create an instance of UIRating:

 let ratingView = UIRating()

Give the desired constraints and set the delegate:

 self.ratingView.delegate = self

DONE!

Customization

 self.stackView.emptyIcon = UIImage(named: "example") //sets the icon for empty rating.
 self.stackView.halfFullIcon = UIImage(named: "example") //sets the icon for half a rating.
 self.stackView.fullIcon = UIIma(named: "example") //sets the icon for a full rating.

 self.stackView.numberOfOptions = 7 //sets the number of rating options.
 
 self.stackView.allowHalfSelections = true //enables selecting half a rating.

Delegate

 extension ViewController: UIRatingDelegate {
    func currentRating(rating: Double) {
        print(rating)
    }
}

Documentation

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

Community

Resources

License

UIVideoPlayer is available under the MIT license, see the LICENSE file for more information.