Code Monkey home page Code Monkey logo

jwstarview's Introduction

JWStarView

一款支持整星半星评论的demo

> XIB 支持

###设置好宽高约束就能正常使用,宽是高x✨的数量

使用说明

    JWStarView*star=[[JWStarView alloc]initWithFrame:CGRectMake(20, 60, 200, 30)];
    star.rateStyle=HalfStar;
    star.delegate=self;
    [self.view addSubview:star];
    
    //只做显示作用
    JWStarView*stars=[[JWStarView alloc]initWithFrame:CGRectMake(20,100, 200, 30)];
    stars.rateStyle=HalfStar;
    stars.delegate=self;
    stars.isIndicator=YES;
    stars.currentScore=3.5;
    [self.view addSubview:stars];

    JWStarView*star1=[[JWStarView alloc]initWithFrame:CGRectMake(20, 140, 200, 30) finish:^(CGFloat currentScore) {
        NSLog(@"current-----%f",currentScore);
    }];
    [self.view addSubview:star1];
    
    JWStarView*star2=[[JWStarView alloc]initWithFrame:CGRectMake(20, 180, 200, 30) numberOfStars:5 rateStyle:HalfStar finish:^(CGFloat currentScore) {
        NSLog(@"star2----%f",currentScore);
    }];
    [self.view addSubview:star2];
    JWStarView *star3=[[JWStarView alloc]initWithFrame:CGRectMake(20, 220, 200, 30) numberOfStars:5 rateStyle:WholeStar delegate:self];
    [self.view addSubview:star3];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.