Giter VIP home page Giter VIP logo

ahmerbaig02 / stratingcontrol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shuhrat10/stratingcontrol

0.0 2.0 0.0 1.89 MB

STRatingControl is a UI control that represents a star rating control. STRatingControl allows you to select a rating starting from 0 to any number of stars you want. You can use default star image or specify your custom images.

License: MIT License

Ruby 19.20% Swift 80.80%

stratingcontrol's Introduction

STRatingControl

CI Status Version License Platform

STRatingControl is the new wonderful rating control written in Swift!. Supports AutoLayout. It was also designed to cover user’s needs during customization. Created with delightful combination, STRatingControl improves your user experience.

How It Looks

Demo

Installation

There are two ways to add the STRatingControl library to your project. Add it as a regular library or install it through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks! pod 'STRatingControl'

You may also quick try the example project with

pod try 'STRatingControl'

Properties

STRatingControl comes with a property set for it's customization as needed:

  • rating : Rating value, can be set or get current value
  • maxRating : Maximum rating value
  • filledStarImage : Image for filled rating stars
  • emptyStarImage : Image for empty rating stars
  • spacing : Space between rating stars

Usage and Customization

STRatingControl implements IB_DESIGNABLE and IBInspectable so you can fully customize it in Interface Builder.

Put on storyboard UIView, and set class STRatingControl.

  • rating : You can set default rating value
  • maxRating : You can set maximum rating value
  • filledStarImage : Image for filled rating stars
  • emptyStarImage : Image for empty rating stars
  • spacing : Space between rating stars

Delegate Method(s)

Tells the delegate when the rating is changed.

  func didSelectRating(control: STRatingControl, rating: Int)

Requirements

iOS 8.0+ Xcode 8.1+ Swift 3.0+

Author

This library is open-sourced by Shukhrat Tursunov.

If you or your users have other specific needs and you're having issues with this control, please contact me so we can figure it out! :-)

License

The MIT License (MIT) Copyright © 2016 Shukhrat Tursunov

stratingcontrol's People

Contributors

shuhrat10 avatar gerharbo avatar

Watchers

James Cloos avatar Ahmer Baig 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.