benliong / iHeartRating

Simple Ratings View for iOS enabling you to use any image as a rating e.g. hearts, stars, pigeons etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Logo

iHeartRating

Simple Ratings View for iOS enabling you to use any image as a rating e.g. hearts, stars, pigeons etc. We extend UIView to make it very easy to add ratings to your app

Getting Started

You want to add pod 'iHeartRating', '~> 0.1' to your Podfile:

target 'MyApp' do
  pod 'iHeartRating', '~> 0.1'
end

Sample Usage

Here is a sample ViewController :-

import iHeartRating
class ViewController: UIViewController, HeartRatingViewDelegate {

  override func viewDidLoad() {
        super.viewDidLoad()
  }


  func heartRatingView(ratingView: HeartRatingView, isUpdating rating:Float) {
      // do something while (rating) has been initiated
  }

  func heartRatingView(ratingView: HeartRatingView, didUpdate rating: Float) {
      // do something when (rating) object has been updates
  }

}

In addition here is a sample setup in a storyboard

storyboard

About

Simple Ratings View for iOS enabling you to use any image as a rating e.g. hearts, stars, pigeons etc.

License:MIT License


Languages

Language:Swift 55.7%Language:Ruby 41.7%Language:Objective-C 1.7%Language:Shell 1.0%