Preview:
sellerRecomendRating = star.tag
        
        var count = 0
        [star1, star2, star3, star4, star5].forEach { star in
            count += 1
            if count <= sellerRecomendRating {
                star?.image = UIImage(named: "star_sel")
            } else {
                star?.image = UIImage(named: "star_unsel")
            }
        }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter