Browse Source

按钮增加title

harry 3 years ago
parent
commit
ad30263c7d

+ 12 - 5
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -395,7 +395,11 @@ public class BFRecordScreenController: BFBaseViewController {
     lazy var subtitleBtn: UIButton = {
         let btn = UIButton(type: .custom)
         btn.setImage(imageInRecordScreenKit(by: "subtitleBtn_on"), for: .normal)
+        btn.setTitle("function_subtitle".BFLocale, for: .normal)
+        btn.titleLabel?.font = UIFont.systemFont(ofSize: 10)
         btn.addTarget(self, action: #selector(subTitleClick), for: .touchUpInside)
+        btn.imageEdgeInsets = UIEdgeInsets(top: -20, left: 4, bottom: 0, right: -4)
+        btn.titleEdgeInsets = UIEdgeInsets(top: 20, left: -40, bottom: -20, right: 0)
         return btn
     }()
 
@@ -403,10 +407,15 @@ public class BFRecordScreenController: BFBaseViewController {
     lazy var soundSettingBtn: UIButton = {
         let btn = UIButton(type: .custom)
         btn.setImage(imageInRecordScreenKit(by: "soundBtn"), for: .normal)
+        btn.setTitle("function_voice".BFLocale, for: .normal)
+        btn.titleLabel?.font = UIFont.systemFont(ofSize: 10)
         btn.addTarget(self, action: #selector(soundSetting), for: .touchUpInside)
+        btn.imageEdgeInsets = UIEdgeInsets(top: -20, left: 4, bottom: 0, right: -4)
+        btn.titleEdgeInsets = UIEdgeInsets(top: 20, left: -40, bottom: -20, right: 0)
         return btn
     }()
 
+
     // 字幕设置面板
     lazy var subtitleSettingView: BFSubtitleSettingView = {
         let subtitleSetting = BFSubtitleSettingView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
@@ -744,17 +753,15 @@ public class BFRecordScreenController: BFBaseViewController {
         //        }
 
         soundSettingBtn.snp.makeConstraints { make in
-            make.right.equalToSuperview().offset(-12)
+            make.right.equalToSuperview().offset(-8)
             make.top.equalToSuperview().offset(98)
-            make.width.equalTo(40)
+            make.width.equalTo(48)
             make.height.equalTo(62)
         }
 
         subtitleBtn.snp.makeConstraints { make in
-            make.right.equalTo(soundSettingBtn)
+            make.right.width.height.equalTo(soundSettingBtn)
             make.top.equalTo(soundSettingBtn.snp.bottom).offset(18)
-            make.width.equalTo(40)
-            make.height.equalTo(62)
         }
 
         withDrawBtn.imageEdgeInsets = UIEdgeInsets(top: -withDrawBtn.imageView!.height, left: 0, bottom: 0, right: -withDrawBtn.titleLabel!.width)