Updated 18 December 2016
Suppose you want to show the rating of customer by stars , but you need to create images and diffrent views to display the stars . So by using the HCSStarRatingView the library, you can easily create the stars to know the rating of the product. and if we are reviewing any product you also need to give the rating by selecting the stars. To show the rating you need to pass the value of stars you needed and false the user interaction. For select the rating enables the user interaction and pass the value zero.link for downloading the library https://github.com/hsousa/HCSStarRatingView : –
1 2 3 4 5 6 7 8 9 |
var starRatingView = HCSStarRatingView() starRatingView = HCSStarRatingView(frame: CGRect(x: 10, y: (SCREEN_WIDTH/2 + 82), width: 120, height: 24)) starRatingView.maximumValue = 5 starRatingView.minimumValue = 0 starRatingView.allowsHalfStars = true starRatingView.value = 2.5 starRatingView.isUserInteractionEnabled = false; starRatingView.tintColor = UIColor().HexToColor(hexString: accent_color) cell.contentView.addSubview(starRatingView); |
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.