|
@@ -277,16 +277,25 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
// 字幕设置
|
|
// 字幕设置
|
|
lazy var subtitleBtn: UIButton = {
|
|
lazy var subtitleBtn: UIButton = {
|
|
let btn = UIButton(type: .custom)
|
|
let btn = UIButton(type: .custom)
|
|
- btn.setImage(imageInRecordScreenKit(by: "subtitleBtn_on"), for: .normal)
|
|
|
|
|
|
+ btn.setBackgroundImage(imageInRecordScreenKit(by: "subtitleBtn_on"), for: .normal)
|
|
btn.addTarget(self, action: #selector(subTitleClick), for: .touchUpInside)
|
|
btn.addTarget(self, action: #selector(subTitleClick), for: .touchUpInside)
|
|
|
|
+ btn.setTitle("function_subtitle".BFLocale, for: .normal)
|
|
|
|
+ btn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
|
|
|
|
+ btn.imagePosition(at: PQButtonImageEdgeInsetsStyle.top, space:10)
|
|
|
|
+ btn.titleLabel?.adjustsFontSizeToFitWidth = true
|
|
return btn
|
|
return btn
|
|
}()
|
|
}()
|
|
|
|
|
|
// 声音设置
|
|
// 声音设置
|
|
lazy var soundSettingBtn: UIButton = {
|
|
lazy var soundSettingBtn: UIButton = {
|
|
let btn = UIButton(type: .custom)
|
|
let btn = UIButton(type: .custom)
|
|
- btn.setImage(imageInRecordScreenKit(by: "soundBtn"), for: .normal)
|
|
|
|
|
|
+ btn.setBackgroundImage(imageInRecordScreenKit(by: "soundBtn"), for: .normal)
|
|
btn.addTarget(self, action: #selector(soundSetting), for: .touchUpInside)
|
|
btn.addTarget(self, action: #selector(soundSetting), for: .touchUpInside)
|
|
|
|
+ btn.setTitleColor(UIColor.white, for: .normal)
|
|
|
|
+ btn.setTitle("function_voice".BFLocale, for: .normal)
|
|
|
|
+ btn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
|
|
|
|
+ btn.imagePosition(at: PQButtonImageEdgeInsetsStyle.top, space:10)
|
|
|
|
+ btn.titleLabel?.adjustsFontSizeToFitWidth = true
|
|
return btn
|
|
return btn
|
|
}()
|
|
}()
|
|
|
|
|
|
@@ -827,7 +836,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
/// 设置字幕样式和位置
|
|
/// 设置字幕样式和位置
|
|
/// - Parameter settingModel: 样式model
|
|
/// - Parameter settingModel: 样式model
|
|
func setSubtitleStyle(settingModel: BFSubTitileSettingModel) {
|
|
func setSubtitleStyle(settingModel: BFSubTitileSettingModel) {
|
|
- subtitleBtn.setImage(imageInRecordScreenKit(by: settingModel.subtitleIsShow ? "subtitleBtn_on" : "subtitleBtn_off"), for: .normal)
|
|
|
|
|
|
+ subtitleBtn.setBackgroundImage(imageInRecordScreenKit(by: settingModel.subtitleIsShow ? "subtitleBtn_on" : "subtitleBtn_off"), for: .normal)
|
|
if settingModel.subtitleIsShow {
|
|
if settingModel.subtitleIsShow {
|
|
// 设置样式
|
|
// 设置样式
|
|
subtitleLabel.strokeColor = settingModel.strokeColor
|
|
subtitleLabel.strokeColor = settingModel.strokeColor
|
|
@@ -909,14 +918,14 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
make.right.equalToSuperview().offset(-12)
|
|
make.right.equalToSuperview().offset(-12)
|
|
make.top.equalToSuperview().offset(98)
|
|
make.top.equalToSuperview().offset(98)
|
|
make.width.equalTo(40)
|
|
make.width.equalTo(40)
|
|
- make.height.equalTo(62)
|
|
|
|
|
|
+ make.height.equalTo(40)
|
|
}
|
|
}
|
|
|
|
|
|
subtitleBtn.snp.makeConstraints { make in
|
|
subtitleBtn.snp.makeConstraints { make in
|
|
make.right.equalTo(soundSettingBtn)
|
|
make.right.equalTo(soundSettingBtn)
|
|
- make.top.equalTo(soundSettingBtn.snp.bottom).offset(18)
|
|
|
|
|
|
+ make.top.equalTo(soundSettingBtn.snp.bottom).offset(18 + 10)
|
|
make.width.equalTo(40)
|
|
make.width.equalTo(40)
|
|
- make.height.equalTo(62)
|
|
|
|
|
|
+ make.height.equalTo(40)
|
|
}
|
|
}
|
|
|
|
|
|
withDrawBtn.imageEdgeInsets = UIEdgeInsets(top: -withDrawBtn.imageView!.height, left: 0, bottom: 0, right: -withDrawBtn.titleLabel!.width)
|
|
withDrawBtn.imageEdgeInsets = UIEdgeInsets(top: -withDrawBtn.imageView!.height, left: 0, bottom: 0, right: -withDrawBtn.titleLabel!.width)
|