我正在尝试将数据从子类发送到父类。实施我的自定义委托后,我收到此错误:
Cannot find protocol declaration for 'SLBPostViewControllerDelegate'
这是我的代码:
孩子.h
@protocol SLBPostViewControllerDelegate <NSObject>
- (void)dataToBeUploaded:(PFFile *)data;
@end
@interface
@property (weak, nonatomic) id <SLBPostViewControllerDelegate> delegate;
@end
孩子.m
[self.delegate dataToBeUploaded:image];
父母.h
@interface SLBWallViewController : UIViewController <SLBPostViewControllerDelegate>
父母.m
- (void)dataToBeUploaded:(PFFile *)data{
NSLog(@"%@", data);
}
我的错误在哪里?我该如何解决?