/FMLStarView

FMLStarView 简单的星级评价的控件

Primary LanguageObjective-C

FMLStarView

🔥 FMLStarView a simple view of star review 一个简单的星级评价的控件

FMLStarView

Introduction

This is a simple view of star review.

If you feel good, please give me a star, thank you very much! ⭐️

Installation

Non-CocoaPods Installation

Just drag the FMLStarView folder into your project.And change the star images as you like;

Usage

  • Use by including the following import:

#import "FMLStarView.h"


_starView = [[FMLStarView alloc] initWithFrame:CGRectMake(0, 0, 150, 25)
                                         numberOfStars:numberOfStars
                                           isTouchable:YES
                                                 index:index];
        _starView.currentScore = currentScore;
        _starView.totalScore = totalScore;
        _starView.isFullStarLimited = isFullStarLimited;
        _starView.delegate = controller;
        [self addSubview:_starView];
        
  • Delegate (@optional):
#pragma mark - FMLStarViewDelegate

- (void)fml_didClickStarViewByScore:(CGFloat)score atIndex:(NSInteger)index {
    NSLog(@"score: %f  index:%zd", score, index);
}


Support

License

MIT License