Prechádzať zdrojové kódy

修改设置自定义速度 UI 显示错误问题

jsonwang 3 rokov pred
rodič
commit
f7bdf5f845

+ 9 - 2
BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

@@ -90,8 +90,12 @@ class PQSpeedSettingView: UIView {
             if viewType == 3 && insertModle != nil{
                 datas.insert(insertModle!, at: 5)
             }
+            if(lastSelectModel != nil){
+                selectCustom()
+            }else{
+                titleCollectionView.reloadData()
+            }
 
-            titleCollectionView.reloadData()
         }
     }
     
@@ -114,7 +118,7 @@ class PQSpeedSettingView: UIView {
     ///   - index: index: 第几位 从0 开始
     ///   - isSettingPlayer: 是否重启播放器
     ///   - setEnable: 设置不可用状态
-    ///   - enableInsert: 是否插入一组新数据,只有第一次< 10s 设置为 true ,自定义及其它情况都不设置 true
+    ///   - enableInsert: 是否插入一组新数据,只有第一次 < 10s 设置为 true ,自定义及其它情况都不设置 true
 
     func setSelectItem(index:Int,isSettingPlayer:Bool = true,setDisable:Bool = false,isCancle:Bool = false,enableInsert:Bool = false) {
        BFLog(message: "setSelectItem is \(index)")
@@ -145,6 +149,9 @@ class PQSpeedSettingView: UIView {
          
             }else{
                 if(index > datas.count){
+                    lastSelectModel?.isSelected = true
+                    titleCollectionView.reloadData()
+
                     return
                 }
                 lastSelectModel = datas[index]