Commit d7576d3256f9b018988aa90d56796db0a18796d7
1 parent
d8ecd158
预览图片乱序的问题 , 播放视频按钮调整
Showing
2 changed files
with
23 additions
and
4 deletions
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift
| @@ -388,9 +388,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -388,9 +388,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 388 | self.images.append(vm) | 388 | self.images.append(vm) |
| 389 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) | 389 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) |
| 390 | 390 | ||
| 391 | + let playImageViewWH:CGFloat = 30 | ||
| 392 | + let playImageView = UIImageView(frame: CGRect(x: 0.5*(imgView.width-playImageViewWH), y: 0.5*(imgView.height-playImageViewWH), width: playImageViewWH, height: playImageViewWH)) | ||
| 393 | + playImageView.image = UIImage(named: "short_video_play") | ||
| 394 | + imgView.addSubview(playImageView) | ||
| 395 | + | ||
| 391 | let playBtn = UIButton(type: .custom) | 396 | let playBtn = UIButton(type: .custom) |
| 392 | playBtn.frame = imgView.bounds | 397 | playBtn.frame = imgView.bounds |
| 393 | - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal) | ||
| 394 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) | 398 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) |
| 395 | playBtn.clipsToBounds = true | 399 | playBtn.clipsToBounds = true |
| 396 | playBtn.layer.cornerRadius = 5 | 400 | playBtn.layer.cornerRadius = 5 |
| @@ -515,9 +519,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | @@ -515,9 +519,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{ | ||
| 515 | self.images.append(vm) | 519 | self.images.append(vm) |
| 516 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) | 520 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) |
| 517 | 521 | ||
| 522 | + let playImageViewWH:CGFloat = 30 | ||
| 523 | + let playImageView = UIImageView(frame: CGRect(x: 0.5*(imgView.width-playImageViewWH), y: 0.5*(imgView.height-playImageViewWH), width: playImageViewWH, height: playImageViewWH)) | ||
| 524 | + playImageView.image = UIImage(named: "short_video_play") | ||
| 525 | + imgView.addSubview(playImageView) | ||
| 526 | + | ||
| 518 | let playBtn = UIButton(type: .custom) | 527 | let playBtn = UIButton(type: .custom) |
| 519 | playBtn.frame = imgView.bounds | 528 | playBtn.frame = imgView.bounds |
| 520 | - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal) | ||
| 521 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) | 529 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) |
| 522 | playBtn.clipsToBounds = true | 530 | playBtn.clipsToBounds = true |
| 523 | playBtn.layer.cornerRadius = 5 | 531 | playBtn.layer.cornerRadius = 5 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewFourWorkAwardCell.swift
| @@ -330,6 +330,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -330,6 +330,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 330 | } | 330 | } |
| 331 | self.expandBtn.top = self.jianjieLabel.top+jienjieH | 331 | self.expandBtn.top = self.jianjieLabel.top+jienjieH |
| 332 | 332 | ||
| 333 | + self.images.removeAll() | ||
| 333 | let imgArr = model.imgs.components(separatedBy: ",") | 334 | let imgArr = model.imgs.components(separatedBy: ",") |
| 334 | if imgArr.count > 0{ | 335 | if imgArr.count > 0{ |
| 335 | for i in 0..<imgArr.count { | 336 | for i in 0..<imgArr.count { |
| @@ -355,9 +356,13 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -355,9 +356,13 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 355 | self.images.append(vm) | 356 | self.images.append(vm) |
| 356 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) | 357 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) |
| 357 | 358 | ||
| 359 | + let playImageViewWH:CGFloat = 30 | ||
| 360 | + let playImageView = UIImageView(frame: CGRect(x: 0.5*(imgView.width-playImageViewWH), y: 0.5*(imgView.height-playImageViewWH), width: playImageViewWH, height: playImageViewWH)) | ||
| 361 | + playImageView.image = UIImage(named: "short_video_play") | ||
| 362 | + imgView.addSubview(playImageView) | ||
| 363 | + | ||
| 358 | let playBtn = UIButton(type: .custom) | 364 | let playBtn = UIButton(type: .custom) |
| 359 | playBtn.frame = imgView.bounds | 365 | playBtn.frame = imgView.bounds |
| 360 | - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal) | ||
| 361 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) | 366 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) |
| 362 | playBtn.clipsToBounds = true | 367 | playBtn.clipsToBounds = true |
| 363 | playBtn.layer.cornerRadius = 5 | 368 | playBtn.layer.cornerRadius = 5 |
| @@ -479,6 +484,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -479,6 +484,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 479 | 484 | ||
| 480 | self.expandBtn.top = self.jianjieLabel.top+jienjieH | 485 | self.expandBtn.top = self.jianjieLabel.top+jienjieH |
| 481 | 486 | ||
| 487 | + self.images.removeAll() | ||
| 482 | let imgArr = model.imgs.components(separatedBy: ",") | 488 | let imgArr = model.imgs.components(separatedBy: ",") |
| 483 | if imgArr.count > 0{ | 489 | if imgArr.count > 0{ |
| 484 | for i in 0..<imgArr.count { | 490 | for i in 0..<imgArr.count { |
| @@ -504,9 +510,14 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | @@ -504,9 +510,14 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{ | ||
| 504 | self.images.append(vm) | 510 | self.images.append(vm) |
| 505 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) | 511 | imgView.kf.setImage(with: URL(string: thumbailImgUrl),placeholder: UIImage(color: UIColor.lightGray, size: imgView.size)) |
| 506 | 512 | ||
| 513 | + let playImageViewWH:CGFloat = 30 | ||
| 514 | + let playImageView = UIImageView(frame: CGRect(x: 0.5*(imgView.width-playImageViewWH), y: 0.5*(imgView.height-playImageViewWH), width: playImageViewWH, height: playImageViewWH)) | ||
| 515 | + playImageView.image = UIImage(named: "short_video_play") | ||
| 516 | + imgView.addSubview(playImageView) | ||
| 517 | + | ||
| 518 | + | ||
| 507 | let playBtn = UIButton(type: .custom) | 519 | let playBtn = UIButton(type: .custom) |
| 508 | playBtn.frame = imgView.bounds | 520 | playBtn.frame = imgView.bounds |
| 509 | - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal) | ||
| 510 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) | 521 | playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside) |
| 511 | playBtn.clipsToBounds = true | 522 | playBtn.clipsToBounds = true |
| 512 | playBtn.layer.cornerRadius = 5 | 523 | playBtn.layer.cornerRadius = 5 |