Latest 1.1
License MIT
Platforms ios 9.0


This is component help you design star rating with highly customization. You can customize colors, number of starts, direction of star. You can also use this for taking input from user. It also supports interface builder design.




CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate MBStarRating into your Xcode project using CocoaPods, specify it in your Podfile:

target '<Your Target Name>' do
    pod 'MBStarRating'

Then, run the following command:

$ pod install

How to Use

You can assign a class MBStarRatingView is your view direclty in storyboard. If want more specific for direction then you can use any of the calss MBStarRatingVerticalView or MBStarRatingHorizontalView.

Note: MBStarRatingView is only supports UIView and not other UI components.

Basic Customization

ratingView.maxRating = 5
ratingView.rating = 5
ratingView.activeColor =  UIColor.<YourColor>
ratingView.incativeColor =  UIColor.<YourColor>
ratingView.circleColor =  UIColor.<YourColor>

Note: You can do this in Interface Builder directly and view how it looks.

Higly Customization

MBStarRating support highly customization. Like you can have seperate start color for each star with in the same view. You can also decide the fill direction of each indivisual star with in same view.

ratingView.starDelegate = object
public protocol MBStarDelegate: class {
    func starRating(view: MBStarRatingView, fillDirectionForStarAt index: Int) -> MBStarBezierPath.Direction
    func starRating(view: MBStarRatingView, fillColor index: Int) -> StarColor



Latest podspec

    "name": "MBStarRating",
    "version": "1.1",
    "summary": "MBStarRating help you to creat Horizontal Picker View similar ot UIPcikerView",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Swifty-iOS": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "source": {
        "git": "",
        "tag": "1.1"
    "source_files": "Source/*.swift",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This