我有PGMidi.h
以下代表
@protocol PGMidiSourceDelegate
- (void) midiSource:(PGMidiSource*)input midiReceived:(const MIDIPacketList *)packetList;
然后在我的viewController.m
我只是想得到一个NSLog
委托被调用的时间
@interface viewController () <PGMidiDelegate, PGMidiSourceDelegate>
@end
@implementation viewController;
- (void) midiSource:(PGMidiSource*)midi midiReceived:(const MIDIPacketList *)packetList
{
NSLog(@"test");
}
我知道代表正在工作,因为在PGMidi
课堂上我也放了
- (void) midiSource:(PGMidiSource*)midi midiReceived:(const MIDIPacketList *)packetList
{
NSLog(@"test");
}
它有效。
但由于某种原因,它没有与 viewController.m 通信。我还在标题中声明了@PGMidi 类。但也许我必须导入整个 PGMidi.h?