From 6720d390eb7b456b966be1ebea1112ae15671b7c Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Tue, 2 Apr 2024 17:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E8=A7=86=E9=A2=91=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=AD=E7=9A=84=20=20[=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=88=97=E8=A1=A8]=20=E6=A8=A1=E5=9D=97=E7=9A=84cell=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0vip=E6=9D=83=E9=99=90=E8=A7=86=E5=9B=BE=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Project/View/CCSpatialPlayView.swift | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/SwiftProject/SwiftProject/Project/View/CCSpatialPlayView.swift b/SwiftProject/SwiftProject/Project/View/CCSpatialPlayView.swift index 962ef91..badd286 100644 --- a/SwiftProject/SwiftProject/Project/View/CCSpatialPlayView.swift +++ b/SwiftProject/SwiftProject/Project/View/CCSpatialPlayView.swift @@ -116,6 +116,21 @@ class CCSpatialPlayView: UIView,UITableViewDelegate,UITableViewDataSource{ cell.mLine?.isHidden = false } cell.backgroundColor = UIColor.hexStringToColor(hexString: "#1F1E20") + if (cell.dataDic?.type == .bitRate || cell.dataDic?.type == .resolution) {//比特率、分辨率部分设计vip内购 + if UserInfo.sharedInstance.isMemberShip { + cell.mLabel1!.centerY = CCSpatialPlayCell1H * 0.5 + cell.mLabel1!.left = 16 + cell.mVIPImgView?.frame = .zero + } + else { + cell.mVIPImgView?.frame = CGRect(x: 0, y: 0, width: 30, height: 30) + cell.mVIPImgView?.centerY = CCSpatialPlayCell1H * 0.5 + cell.mVIPImgView?.left = 16 + + cell.mLabel1!.centerY = CCSpatialPlayCell1H * 0.5 + cell.mLabel1!.left = 16 + 30 + 5 + } + } return cell }else{ let cell:CCSpatialPlayCell2 = tableView.dequeueReusableCell(withIdentifier: CCSpatialPlayCell2Id)! as! CCSpatialPlayCell2 @@ -150,7 +165,7 @@ let CCSpatialPlayCell1H = 62.0 let CCSpatialPlayCell1W = SCREEN_Width - 48 class CCSpatialPlayCell1: UITableViewCell { - + var mVIPImgView:UIImageView? var mLabel1:UILabel? var mLabel2:UILabel? var mImgView:UIImageView? @@ -161,6 +176,11 @@ class CCSpatialPlayCell1: UITableViewCell { self.backgroundColor = UIColor.clear self.contentView.backgroundColor = UIColor.clear + mVIPImgView = UIImageView() + self.contentView.addSubview(mVIPImgView!) + mVIPImgView?.frame = .zero + mVIPImgView?.image = UIImage(named: "logo") + mLabel1 = UILabel() mLabel1!.bounds = CGRect(x: 0, y: 0, width: 100, height: 0) mLabel1!.textColor = UIColor.white