diff --git a/Classes/AMRatingControl.h b/Classes/AMRatingControl.h index ba286d3..a27f701 100755 --- a/Classes/AMRatingControl.h +++ b/Classes/AMRatingControl.h @@ -57,6 +57,11 @@ typedef void (^EditingDidEndBlock)(NSUInteger rating); solidImage:(UIImage *)solidImageOrNil andMaxRating:(NSInteger)maxRating; - +/** + Sets empty color and solid color of the stars. + This can be helpful to customize the colors if the control is initiated from nib using initWithCoder + * @param emptyColor & solidColor + **/ +-(void) setEmptyColor:(UIColor *)emptyColor solidColor:(UIColor *)solidColor; @end diff --git a/Classes/AMRatingControl.m b/Classes/AMRatingControl.m index a26ef58..1380c5b 100755 --- a/Classes/AMRatingControl.m +++ b/Classes/AMRatingControl.m @@ -73,6 +73,12 @@ - (void)setStarSpacing:(NSUInteger)starSpacing [self setNeedsDisplay]; } +-(void) setEmptyColor:(UIColor *)emptyColor solidColor:(UIColor *)solidColor +{ + _emptyColor = emptyColor; + _solidColor = solidColor; +} + /**************************************************************************************************/ #pragma mark - Birth & Death