Bläddra i källkod

1,3 张图片素材,未选中问题

jsonwang 3 år sedan
förälder
incheckning
03529af7e8
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

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

@@ -116,7 +116,7 @@ class PQSpeedSettingView: UIView {
     ///   - setEnable: 设置不可用状态
     func setSelectItem(index:Int,isSettingPlayer:Bool = true,setDisable:Bool = false,isCancle:Bool = false) {
        BFLog(message: "setSelectItem is \(index)")
-        if(index < 0 || index >= datas.count){
+        if(index < 0 ){
             BFLog(message: "选择位置数据出错\(index)")
             return
         }
@@ -127,7 +127,7 @@ class PQSpeedSettingView: UIView {
             }
         }
         lastSelectModel?.isSelected = false
-        // && index < datas.count && (datas[index].title != "自定义" || datas[index].title != "自定义\n快慢速"))
+       
         if viewType == 3{
             if(index > 4 && datas.count < 7){
                 if(index >= datas.count){
@@ -142,6 +142,9 @@ class PQSpeedSettingView: UIView {
                 }
          
             }else{
+                if(index > datas.count){
+                    return
+                }
                 lastSelectModel = datas[index]
             }
         }else{