隐藏分辨率按钮
This commit is contained in:
parent
07c8f665d0
commit
c709faae38
@ -123,12 +123,13 @@ class VPDetailPlayerControlView: VPVideoPlayerControlView {
|
||||
config.background.backgroundColor = .color949494(alpha: 0.4)
|
||||
|
||||
let button = UIButton(configuration: config)
|
||||
button.isHidden = true
|
||||
button.layer.cornerRadius = 15
|
||||
button.layer.masksToBounds = true
|
||||
button.configurationUpdateHandler = { [weak self] button in
|
||||
guard let self = self else { return }
|
||||
let revolution = VPVideoRevolutionManager.manager.revolution
|
||||
button.configuration?.attributedTitle = AttributedString.createAttributedString(string: revolution.toString ?? "", color: .colorFFFFFF(), font: .fontRegular(ofSize: 13))
|
||||
button.configuration?.attributedTitle = AttributedString.createAttributedString(string: revolution.toString, color: .colorFFFFFF(), font: .fontRegular(ofSize: 13))
|
||||
}
|
||||
button.addTarget(self, action: #selector(handleRevolutionButton), for: .touchUpInside)
|
||||
return button
|
||||
@ -278,18 +279,6 @@ extension VPDetailPlayerControlView {
|
||||
make.right.equalToSuperview().offset(-10)
|
||||
}
|
||||
|
||||
revolutionButton.snp.makeConstraints { make in
|
||||
make.height.top.equalTo(epBgView)
|
||||
make.left.equalTo(epBgView.snp.right).offset(10)
|
||||
}
|
||||
|
||||
rateButton.snp.makeConstraints { make in
|
||||
make.right.equalToSuperview().offset(-15)
|
||||
make.left.equalTo(revolutionButton.snp.right).offset(10)
|
||||
make.height.top.equalTo(epBgView)
|
||||
make.width.equalTo(50)
|
||||
}
|
||||
|
||||
timeLabel.snp.makeConstraints { make in
|
||||
make.left.equalToSuperview().offset(15)
|
||||
make.bottom.equalTo(epBgView.snp.top).offset(-16)
|
||||
@ -298,6 +287,30 @@ extension VPDetailPlayerControlView {
|
||||
lockView.snp.makeConstraints { make in
|
||||
make.edges.equalToSuperview()
|
||||
}
|
||||
|
||||
if VPLoginManager.manager.userInfo?.user_level == .ad {
|
||||
|
||||
rateButton.snp.makeConstraints { make in
|
||||
make.right.equalToSuperview().offset(-15)
|
||||
make.left.equalTo(epBgView.snp.right).offset(10)
|
||||
make.height.top.equalTo(epBgView)
|
||||
make.width.equalTo(50)
|
||||
}
|
||||
|
||||
} else {
|
||||
revolutionButton.isHidden = false
|
||||
revolutionButton.snp.makeConstraints { make in
|
||||
make.height.top.equalTo(epBgView)
|
||||
make.left.equalTo(epBgView.snp.right).offset(10)
|
||||
}
|
||||
|
||||
rateButton.snp.makeConstraints { make in
|
||||
make.right.equalToSuperview().offset(-15)
|
||||
make.left.equalTo(revolutionButton.snp.right).offset(10)
|
||||
make.height.top.equalTo(epBgView)
|
||||
make.width.equalTo(50)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user