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