Giter VIP home page Giter VIP logo

zystarview's Introduction

ZYStarView

介绍

Swift星星显示、选择的封装 XIb和纯代码均可使用(XIb体验极佳) 喜欢记得给个✨✨

功能支持

  • 星数设置: 在一块区域均分显示想要设定的星星
  • 设置星数计算单位:支持一星、半星、随意float定制显示
  • 显示动画设置: 点击星星显示动画
  • 回调: 星数设置完之后会返回当前星数作为回调
  • 支持xib: xib storyBoard 创建直接对应类即可.属性支持keyPath

Cocopods

     pod 'ZYStarView','~> 2.0'

代码使用方法

// 创建starView并回调当前选中星数,参数说明看备注很清楚
let starview = ZYStarRateView.init(frame: CGRect.init(x: (UIScreen.main.bounds.width - 320)/2, y: 600, width: 320, height: 100), starCount: 8, currentStar: 2, rateStyle: .half) { (current) -> (Void) in
print(current)
}

XIB代码使用方法

灰常简单,如果只是显示不要回调不需要写代码。 image

2.0版之后,除了keypath,可以在xib修改属性

演示

image

更新

2.0:使用@IBInspectable在xib中显示属性

1.0:修复xib 在 uitablewview 布局不准确问题

zystarview's People

Contributors

rainmango avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zystarview's Issues

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.