Snippets Collections
   var count = 0
        [cell.star1ImageView, cell.star2ImageView, cell.star3ImageView, cell.star4ImageView, cell.star5ImageView].forEach { star in
            count += 1
            if count <= rating {
                star?.image = UIImage(named: "star_sel")
            }
        }
star

Fri Apr 22 2022 05:32:05 GMT+0000 (UTC)

#ios #swift #rating #review

Save snippets that work with our extensions

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