Skip to content

ijameelkhan/DJWStarRatingView

 
 

Repository files navigation

DJWStarRatingView

A view that represents a given rating using stars. Uses custom drawing to allow their appearance at any size. The view also allows for editing, using either tapping, panning, or both.

Demo

Screenshot

Usage

Create a new instance of DJWStarRatingView, utilising the designated initialiser:

- (instancetype)initWithStarSize:(CGSize)starSize
                   numberOfStars:(NSInteger)numberOfStars
                          rating:(float)rating
                       fillColor:(UIColor *)fillColor
                   unfilledColor:(UIColor *)unfilledColor
                     strokeColor:(UIColor *)strokeColor;

rating value's decimal part can either be .0 or .5.

Installation

Simply add DJWStarRatingView to your Podfile if you're using Cocoapods. Alternatively, add DJWStarRatingView.h and DJWStarRatingView.m to your project. Included in this repository is a demo application, showing the project in action.

License

DJWStarRatingView is licensed under the MIT license.

About

A simple, customisable, star rating view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 92.2%
  • Ruby 7.8%