CC攻城狮
2019-09-20 09:25
采纳率: 50%
浏览 578
已采纳

iOS AppStore上传审核被拒,是如下代码的问题

就是if x==y这行代码

func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
        if !peripheralData.contains(peripheral){
            peripheralData.append(peripheral)
            var x:String = "Easy"
            let y:String = "EasyEngrave"
            if peripheral.name!.isEmpty{

            }else{
                x=peripheral.name!
            }
            if x != ""{
                if x==y{
                    connect(peripheral: peripheral)

                }

            }

            //ViewController.connectname.text=ViewController.connectname.text!+x
        }
    }
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题