Open hzhh110 opened 4 years ago
[self.baby setBlockOnConnected:^(CBCentralManager central, CBPeripheral peripheral) { NSLog(@"设备:%@--连接成功",peripheral.name); weakSelf.linkState = BluetoothLinkState_Successful; if ([weakSelf.delegate respondsToSelector:@selector(MyBluetoothToolLink:)]) { [weakSelf.delegate MyBluetoothToolLink:BluetoothLinkState_Successful]; NSLog(@"") weakSelf.currentPeripheral = peripheral; } //停止扫描 [weakSelf.baby cancelScan]; }];
[self.baby setBlockOnConnected:^(CBCentralManager central, CBPeripheral peripheral) { NSLog(@"设备:%@--连接成功",peripheral.name); weakSelf.linkState = BluetoothLinkState_Successful; if ([weakSelf.delegate respondsToSelector:@selector(MyBluetoothToolLink:)]) { [weakSelf.delegate MyBluetoothToolLink:BluetoothLinkState_Successful]; NSLog(@"") weakSelf.currentPeripheral = peripheral; } //停止扫描 [weakSelf.baby cancelScan]; }];