EngrAhsanAli/AARatingBar

Not accurate with tableview

pranavpari opened this issue · 3 comments

Hello,
I am using it inside the cell to display the rating, but its setting randomly. every time I scroll it display diff rating value.

modify the func drawRatingBar() method to remove previously added views, they are just overlapping

worked for me

/// Draw Initial rating bar
func drawRatingBar() {

    // dhomes : Modified to remove previously added stars
    for v in self.subviews {
        v.removeFromSuperview()
    }
    let unFilledView = getRatingView(withIcon: unFilledIcon)
    filledView = getRatingView(withIcon: filledIcon)
    
    addSubview(filledView)
    addSubview(unFilledView)
    
}

OK thank I will try it.

The issue has been fixed in the library. Thanks for using this library!