Selaa lähdekoodia

Merge branch 'master' of https://git.yishihui.com/iOS/BFRecordScreenKit

* 'master' of https://git.yishihui.com/iOS/BFRecordScreenKit:
  设置 UI 开关色值
harry 3 vuotta sitten
vanhempi
commit
c1fd80e212

+ 5 - 2
BFRecordScreenKit/Classes/RecordScreen/View/BFSubtitleSettingView.swift

@@ -190,7 +190,10 @@ class BFSubtitleSettingView: UIView {
             make.right.equalToSuperview().offset(-18)
             make.top.equalTo(line.snp.top).offset(13)
         }
- 
+        if #available(iOS 13.0, *) { disabeSwitch.subviews.first?.subviews.first?.backgroundColor = UIColor.hexColor(hexadecimal: "#393939") } else if #available(iOS 12.0, *) { disabeSwitch.subviews.first?.subviews.first?.subviews.first?.backgroundColor = UIColor.hexColor(hexadecimal: "#393939") }
+        disabeSwitch.onTintColor = UIColor.hexColor(hexadecimal: "#393939")
+       
+     
     }
     
     override func layoutSubviews() {
@@ -278,7 +281,7 @@ class BFSubtitleSettingView: UIView {
         print("字幕开关状态\(uiswitch.isOn)")
 
         subtitle.setting.subtitleIsShow = !uiswitch.isOn
-
+        uiswitch.thumbTintColor = !uiswitch.isOn ? UIColor.white :  UIColor.hexColor(hexadecimal: "#389AFF")
         if subtitleSettingCallBack != nil {
             subtitleSettingCallBack!(subtitle)
         }