我应该如何在objective-c中编写这段代码:
kr = IOServiceAddMatchingNotification(gNotifyPort,
kIOFirstMatchNotification, matchingDict, RawDeviceAdded, NULL, &gRawAddedIter);
我试过这个:
kr = IOServiceAddMatchingNotification(gNotifyPort, kIOFirstMatchNotification,
matchingDict, @selector(RawDeviceAdded), NULL, &gRawAddedIter);
函数看起来像:
(void)RawDeviceAdded:(void *)refCon iterator:(io_iterator_t)iterator
{
.....
}
我不确定它是否正确。