Git Product home page Git Product logo

ratingstar-ios's Introduction

Rating Star

A nice-looking new concept for rating bars implemented for iOS.

Version Platform API GitHub issues License

The concept looks like a flower with every petal representing a specific rating.
The idea of this project is originally inspired by this concept.

Example

Installation

RatingStar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RatingStar'

For an Android implementation please check this repository.

Usage

  • Please check the example in the source code for more detailed information, or check the table below for a list of available properties.
  • If you want to use storyboards, just drop a UIView into your ViewController and set its class to UIRatingStar. Then customize is through the attributes in the inspector.
  • If you don't use storyboards, you need to write a few lines of code to initialize with frame and set the properties:
import RatingStar

let starColor: UIColor = .blue
let selectionColor: UIColor = .orange

let ratingStar = UIRatingStar(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
ratingStar.value = 3
ratingStar.unselectedColor = starColor
ratingStar.selectedColor = selectionColor

self.view.addSubview(ratingStar)
  • List of available properties:
Property Name Default Value Description
value 0 The initial rating of the view.
starColor #007AFF The color of the star.
selectionColor #FFAF00 The color of selected petals of the star.
showNumbers true Determines weather to show numbers on the petals of the star.

Roadmap

The library is still not as elegant as the original concept, so I might work more on adding some animations in my spare time. (But unfortunately since I have another job, I can't give any promises or deadlines).

Contributing

If you encounter a bug or you have a feature in mind please make a pull request and i will merge it as soon as possible, if you can't (for some reason) make a pull request please open an issue and i will happily do respond to it.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.
I will try to provide release notes with future releases.

License

This project is licensed under the Apache-2.0 license - see the LICENSE.md file for more details.

ratingstar-ios's People

Contributors

mohakapt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.