Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.23 KB

README.md

File metadata and controls

32 lines (19 loc) · 1.23 KB

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.