| | |
| | | } |
| | | |
| | | btn_belike = UIButton(type: .custom) |
| | | btn_belike.setImage(UIImage(named: "btn_good")?.withTintColor(UIColor(hexStr: "fe5b60")), for: .selected) |
| | | btn_belike.setImage(UIImage(named: "btn_good_1")?.withTintColor(UIColor(hexStr: "fe5b60")), for: .selected) |
| | | btn_belike.setImage(UIImage(named: "btn_good"), for: .normal) |
| | | btn_belike.addTarget(self, action: #selector(belike), for: .touchUpInside) |
| | | contentView.addSubview(btn_belike) |
| | |
| | | |
| | | func setCommentModel(_ model:CommentModel){ |
| | | self.model = model |
| | | img_userCover.sd_setImage(with: URL(string: model.nickname)) |
| | | img_userCover.sd_setImage(with: URL(string: model.avatar.jq_urlEncoded())) |
| | | label_content.text = model.content |
| | | label_userName.text = model.nickname |
| | | btn_belike.isSelected = model.like == .yes |