我的班级 .h 看起来像:
@protocol AppInfoDelegate;
@class InfoTextView;
@interface AppInfoViewController : UIViewController <AppInfoDelegate> {
}
@property (nonatomic, retain) NSArray *textObjectsArray;
@property (nonatomic, retain) InfoTextView *itView;
@property (nonatomic, retain) UIButton *pgBackButton;
@property (nonatomic, retain) UIButton *pgFwdButton;
@end
@protocol AppInfoDelegate <NSObject>
- (void)closeButtonPressed:(id)sender;
@end
我收到一条警告,提示找不到 AppInfoDelegate 的协议定义。执行此操作的正确方法是什么,为什么找不到?我需要在接口之前有协议的完整定义吗?谢谢!