1,实现1是找不到的。。。
#import <UIKit/UIKit.h>
#import "RepositoryCommonView.h"
@interface RepositoryViewController : UIViewController<myDelegate>
@property(nonatomic,strong) IBOutletUIScrollView *myScrollView;
@end
#import <UIKit/UIKit.h>
#import "RepositoryCommonView.h"
2,实现2 是可以的。。。
@interface RepositoryDetailViewController : UIViewController<myDelegate>
@property(nonatomic,strong) IBOutletUIScrollView *myScrollView;
@property(nonatomic,strong) NSString *tagId;
@end
3,代理在这个文件实现。。。
@protocol myDelegate <NSObject>
-(void)tagId:(NSString *)tagId;
@end
@interface RepositoryCommonView : UIView<TTTAttributedLabelDelegate>
@property(nonatomic,strong) id<myDelegate> repositoryDelegate;
@property(nonatomic) BOOL isFromDetailPage;
-(UIView *)initData:(NSDictionary *)dic;
@end
解决:
#import <UIKit/UIKit.h>
#import "TTTAttributedLabel.h"
#import "RepositoryViewController.h"
这个东西太不智能了,自己追自己的尾巴玩。。。因此下次 注意了,不必要的头文件不要乱引入,系统的寻找规则会让你蛋疼不堪的,
@protocol myDelegate <NSObject>
-(void)tagId:(NSString *)tagId;
@end
@interface CommonView : UIView<TTTAttributedLabelDelegate>
@property(nonatomic,strong) id<myDelegate> repositoryDelegate;
@property(nonatomic) BOOL isFromDetailPage;
-(UIView *)initData:(NSDictionary *)dic;
@end