为视频转换页面中的 [格式列表] 模块的cell增加vip权限视图判断

This commit is contained in:
bluesea 2024-04-02 17:25:29 +08:00
parent ec93b1f6c5
commit 6720d390eb

View File

@ -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