STRatingControl
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
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 valuemaxRating
: Maximum rating valuefilledStarImage
: Image for filled rating starsemptyStarImage
: Image for empty rating starsspacing
: 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 valuemaxRating
: You can set maximum rating valuefilledStarImage
: Image for filled rating starsemptyStarImage
: Image for empty rating starsspacing
: 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