| | |
| | | private func setUI(){ |
| | | backgroundColor = UIColor(hexString: "#41A2EB") |
| | | jq_cornerRadius = 8 |
| | | addSubview(img_hint) |
| | | img_hint.snp.makeConstraints { make in |
| | | make.left.equalTo(25) |
| | | make.centerY.equalToSuperview() |
| | | make.width.equalTo(27) |
| | | make.height.equalTo(27) |
| | | } |
| | | |
| | | addSubview(img_hint_playing) |
| | | addSubview(img_hint) |
| | | addSubview(btn_play) |
| | | |
| | | img_hint_playing.snp.makeConstraints { make in |
| | | make.center.equalToSuperview() |
| | | make.width.equalTo(45) |
| | | make.height.equalTo(31) |
| | | } |
| | | |
| | | addSubview(btn_play) |
| | | btn_play.isUserInteractionEnabled = false |
| | | btn_play.snp.makeConstraints { make in |
| | | make.right.equalTo(-23) |
| | | make.left.equalTo(img_hint_playing.snp.right).offset(0) |
| | | make.centerY.equalToSuperview() |
| | | make.width.equalTo(32) |
| | | make.height.equalTo(32) |
| | | } |
| | | |
| | | img_hint.snp.makeConstraints { make in |
| | | make.right.equalTo(img_hint_playing.snp.left).offset(0) |
| | | make.centerY.equalToSuperview() |
| | | make.width.equalTo(27) |
| | | make.height.equalTo(27) |
| | | } |
| | | |
| | | playBtn.addTarget(self, action: #selector(playingAction), for: .touchUpInside) |
| | | addSubview(playBtn) |
| | | playBtn.snp.makeConstraints { make in |