peterprokop / StarryStars

StarryStars is iOS GUI library for displaying and editing ratings
MIT License
174 stars 23 forks source link

StarryStars

StarryStars is iOS GUI library for displaying and editing ratings

Features

StarryStars' RatingView is both IBDesignable and IBInspectable

You can change any of the following properties right in the interface builder:

Properties

And see the result right away:

RatingView

To add RatingView to your Storyboard/.xib file just drag a generic UIView from palette, then in "Custom Class" section of identity inspector set class to RatingView

Installation

Carthage

Manual

Just clone and add StarryStars directory to your project.

Cocoapods

pod 'StarryStars', '~> 2.0.0'
use_frameworks! 

Requirements

Usage from code

Swift:

let rvRightToLeft = RatingView()

rvRightToLeft.frame = view.bounds

view.addSubview(rvRightToLeft)
rvRightToLeft.editable = true
rvRightToLeft.delegate = self

// RatingView will respect setting this property
rvRightToLeft.semanticContentAttribute = .forceRightToLeft

Objective C:

RatingView* rvRightToLeft = [[RatingView alloc] init];

rvRightToLeft.frame = self.view.bounds;

[self.view addSubview:rvRightToLeft];
rvRightToLeft.editable = YES;
rvRightToLeft.delegate = self;

// RatingView will respect setting this property
rvRightToLeft.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;

Other Projects

SwiftOverlays - Swift GUI library for displaying various popups and notifications.