Snippets Collections
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")
            }
        }
star

Fri Apr 22 2022 05:32:05 GMT+0000 (Coordinated Universal Time)

#ios #swift #rating #review #star #rate

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension