我一直在试图弄清楚这几天。我是初学者,所以请多多包涵。我已经阅读了很多关于代表团的文章,但我仍然不明白。任何帮助将非常感激。
标题
@protocol MidiInit <NSObject>
@end
@interface CBAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) id midiDelegate;
-(id) initWithDelegate :(id <MidiInit>) delegate;
@end
执行
@synthesize midiDelegate;
-(id) initWithDelegate:(id<MidiInit>)delegate
{
if ((self = [super init]))
{
self.midiDelegate = delegate;
midi = [[MidiClass alloc] initWithDelegate://not sure what to put here];
}
return self;
}