Commit d7576d3256f9b018988aa90d56796db0a18796d7

Authored by “张旭”
1 parent d8ecd158

预览图片乱序的问题 , 播放视频按钮调整

metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift
... ... @@ -388,9 +388,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{
388 388 self.images.append(vm)
389 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 396 let playBtn = UIButton(type: .custom)
392 397 playBtn.frame = imgView.bounds
393   - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal)
394 398 playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside)
395 399 playBtn.clipsToBounds = true
396 400 playBtn.layer.cornerRadius = 5
... ... @@ -515,9 +519,13 @@ class CNLiveVitaeWorkCell: UITableViewCell{
515 519 self.images.append(vm)
516 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 527 let playBtn = UIButton(type: .custom)
519 528 playBtn.frame = imgView.bounds
520   - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal)
521 529 playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside)
522 530 playBtn.clipsToBounds = true
523 531 playBtn.layer.cornerRadius = 5
... ...
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/我的简历cell/CNLiveDigitalResumePreviewFourWorkAwardCell.swift
... ... @@ -330,6 +330,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{
330 330 }
331 331 self.expandBtn.top = self.jianjieLabel.top+jienjieH
332 332  
  333 + self.images.removeAll()
333 334 let imgArr = model.imgs.components(separatedBy: ",")
334 335 if imgArr.count > 0{
335 336 for i in 0..<imgArr.count {
... ... @@ -355,9 +356,13 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{
355 356 self.images.append(vm)
356 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 364 let playBtn = UIButton(type: .custom)
359 365 playBtn.frame = imgView.bounds
360   - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal)
361 366 playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside)
362 367 playBtn.clipsToBounds = true
363 368 playBtn.layer.cornerRadius = 5
... ... @@ -479,6 +484,7 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{
479 484  
480 485 self.expandBtn.top = self.jianjieLabel.top+jienjieH
481 486  
  487 + self.images.removeAll()
482 488 let imgArr = model.imgs.components(separatedBy: ",")
483 489 if imgArr.count > 0{
484 490 for i in 0..<imgArr.count {
... ... @@ -504,9 +510,14 @@ class CNLiveDigitalResumePreviewFourWorkAwardCell:UITableViewCell{
504 510 self.images.append(vm)
505 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 519 let playBtn = UIButton(type: .custom)
508 520 playBtn.frame = imgView.bounds
509   - playBtn.setImage(UIImage(named: "short_video_play"), for: .normal)
510 521 playBtn.addTarget(self, action: #selector(playBtnAction(btn:)), for: .touchUpInside)
511 522 playBtn.clipsToBounds = true
512 523 playBtn.layer.cornerRadius = 5
... ...