Commit c47bc9526359713c6eada7109254afb2c7ed81bc
1 parent
dfe5ed8e
全部课程类型 区块加副标题
Showing
2 changed files
with
12 additions
and
1 deletions
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
| ... | ... | @@ -107,7 +107,16 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 107 | 107 | bgBackView.layer.cornerRadius = 12 |
| 108 | 108 | bgBackView.backgroundColor = .white |
| 109 | 109 | |
| 110 | - let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 110 | + var titleTop:CGFloat = DownSlideRecommendLeftGap | |
| 111 | + if model.blockSubTitle?.count ?? 0 > 0{ | |
| 112 | + let subtitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 17)) | |
| 113 | + subtitleLbl.text = model.blockSubTitle | |
| 114 | + subtitleLbl.font = Font_12 | |
| 115 | + subtitleLbl.textColor = HexColor("#999999") | |
| 116 | + bgBackView.addSubview(subtitleLbl) | |
| 117 | + titleTop = DownSlideRecommendLeftGap+17+1 | |
| 118 | + } | |
| 119 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: titleTop, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | |
| 111 | 120 | titleLbl.text = model.blockName ?? "全部课程" |
| 112 | 121 | titleLbl.font = BoldFont_21 |
| 113 | 122 | titleLbl.textColor = HexColor("#333333") | ... | ... |
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift