To run the example project, clone the repo, and run pod install from the Example directory first.
Suitable for Xcode 8.2.1 (swift 3.0.2)
KHRatingView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KHRatingView"##Usage (Sample Program)
class ViewController: UIViewController {
@IBOutlet weak var smoothRatingView: KHRatingView!
@IBOutlet weak var singleSelectionRatingView: KHRatingView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
smoothRatingView.delegate = self
singleSelectionRatingView.delegate = self
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
extension ViewController:KHRatingViewDelegate{
func ratingChanged(_ viewTag: Int32, ratingValue rating: Float) {
print("viewTag: \(viewTag), ratingValue:\(rating)")
}
}MKHG Lab, mkhglab@gmail.com
KHRatingView is available under the MIT license. See the LICENSE file for more info.