Commit c6cbd098 authored by Steven杜宇's avatar Steven杜宇

// 视频底部收藏点赞

parent 26efa1fb
......@@ -26,10 +26,7 @@ class YHHomeWebBottomView: UIView {
var starCount: Int = 0
var isStar: Bool = false {
didSet {
var imgName = "home_web_star"
if isStar {
imgName = "home_web_stared"
}
let imgName = isStar ? "home_web_stared" : "home_web_star"
var image = UIImage(named: imgName)
if tintMode == .dark {
starButton.bottomTitleLabel.textColor = .white
......@@ -44,10 +41,7 @@ class YHHomeWebBottomView: UIView {
var isLike: Bool = false {
didSet {
var imgName = "home_web_like"
if isLike {
imgName = "home_web_liked"
}
let imgName = isLike ? "home_web_liked" : "home_web_like"
var image = UIImage(named: imgName)
if tintMode == .dark {
likeButton.bottomTitleLabel.textColor = .white
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment