我有一个视图控制器 FirstViewController,它有一个子类 FourthViewController。FirstViewController 的接口是:
#import "FourthViewController.h"
@interface FirstViewController : UIViewController <FourthViewControllerDelegate>
在 FourthViewController 的 .h 中,我有:
#import "FirstViewController.h"
@protocol FourthViewControllerDelegate
-(void) updateLabel;
@end
@interface FourthViewController : FirstViewController
@property (weak, nonatomic) id<FourthViewControllerDelegate>delegate;
这给了我错误消息:找不到'FirstViewController'的接口声明,'FourthViewController'的超类我不确定为什么会发生这个错误。任何建议都会有所帮助。