I want to define a selector in CBPeripheralDelegate, which is func peripheral(peripheral: CBPeripheral, didUpdateValueForCharacteristic characteristic: CBCharacteristic, error: NSError?).
In swift3, it is renamed to peripheral(_: didUpdateValueFor:error), and it is same as the func peripheral(peripheral: CBPeripheral, didUpdateValueForDescriptor descriptor: CBDescriptor, error: NSError?)
So when I try to define a selector like this #selector(CBPeripheralDelegate.peripheral(_:didUpdateValueFor:error:)) will cause a compile error: ambiguous use.
And I try to define like the doc describe: #selector(((CBPeripheralDelegate.peripheral(_:didUpdateValueFor:error:)) as (CBPeripheralDelegate) -> (CBPeripheral, CBCharacteristic, NSError) -> Void),
failed either.
So what is the right way to define a selector in swift3?