我在旧的 iOS 应用程序上运行 ARC“重构”。
但是,我收到以下错误
Receiver type 'WarningCallback' for instance message is a forward declaration
警告回调.h
@class WarningCallback;
#import <UIKit/UIKit.h>
#import "WebViewController.h"
#import "Constants.h"
@protocol WarningCallback
-(void) warningDismissedAndNavigateToCall:(BOOL) navigateToCall;
@end
@interface WarningViewController : WebViewController {
}
@property (nonatomic,retain) WarningCallback* parentVC;
@end
警告回调.m
#import "WarningViewController.h"
@implementation WarningViewController
@synthesize parentVC;
...
-(IBAction) done:(id) sender {
[[self parentVC] warningDismissedAndNavigateToCall:NO];
}
@end
错误发生在WarningCallback.m的以下行
[[self parentVC] warningDismissedAndNavigateToCall:NO];