showBluetoothAccessoryPickerWithNameFilter:完成:取消按钮

时间:2014-04-01 16:04:34

标签: ios objective-c external-accessory

有没有办法在showBluetoothAccessoryPickerWithNameFilter上捕获取消按钮事件:完成:?

如果我点击设备和取消按钮,

完成块将在相同的时间(方式)中执行。

谢谢。

1 个答案:

答案 0 :(得分:4)

愚蠢的问题...... 我在阅读文档时必须多加注意

[[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:nil completion:^(NSError *error) {
    if(error != nil && [error code] == EABluetoothAccessoryPickerResultCancelled)
        /* Cancel pressed */;
}];

感谢@Larme

相关问题