1
所以我有這個 -奇怪的未知類型的名稱問題
#import <UIKit/UIKit.h>
#import "RateView.h"
@interface BasicCardViewController : UIViewController<RateViewDelegate>
@property (weak, nonatomic) IBOutlet UILabel *label;
@property(copy, nonatomic)NSString *message;
@property(atomic)NSInteger rating;
@property (strong, nonatomic) IBOutlet RateView *rateView;
@property (weak, nonatomic) IBOutlet UILabel *ratingLabel;
@end
,這 - 在我RateView.h文件。
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@class RateView;
@protocol RateViewDelegate
-(void)rateView:(RateView *)rateView ratingDidChange:(float)rating;
@end
@interface RateView : UIView
@property(strong,nonatomic)UIImage* fullSelectedStar;
@property(strong,nonatomic)UIImage* notSelectedStar;
@property(strong, nonatomic)UIImage* halfSelectedStar;
@property (assign, nonatomic)float rating;
@property(assign) BOOL editable;
@property (strong) NSMutableArray* imageViews;
@property(assign,nonatomic) int maxRating;
@property(assign) int midMargin;
@property(assign)int leftMargin;
@property (assign) CGSize minImageSize;
@property (assign) id <RateViewDelegate> delegate;
@end
,但我得到兩個錯誤 -
1.Cannot找到 'TooviaRateViewDelegate' 2.Unknown類型名稱 「RateView」
我試圖清理協議聲明,我已經證實這些文件是他們應該在的地方(他們的文件路徑是該項目的)。
這是怎麼發生的?
編輯 - 我AppDelegate.h
#import <UIKit/UIKit.h>
#import "SearchViewController.h"
@interface TooviaAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property NSOperationQueue *queue;
@property (strong, nonatomic) NSDictionary *userProfile;
@property (strong, nonatomic) SearchViewController *searchViewController;
- (NSOperationQueue*) getOperationQueue;
- (id)getSettings:(NSString *)keyPath;
- (void) saveCookies;
@end
也有問題,我SearchViewController
#import <UIKit/UIKit.h>
#import "BasicCardViewController.h"
@interface SearchViewController : UIViewController
<UISearchBarDelegate, UISearchDisplayDelegate, UITableViewDataSource, UITableViewDelegate>
- (IBAction)searchButtonClicked:(UIButton *)sender;
- (IBAction)backgroundTap:(id)sender;
@property (weak, nonatomic) IBOutlet UITableView *resultTable;
@property (weak, nonatomic) IBOutlet UITextField *searchBar;
@property (strong, nonatomic) NSArray *resultsTuples;
@property (weak, nonatomic) IBOutlet UIButton *searchButton;
@property (copy, nonatomic) NSArray *controllers;
@property(strong,nonatomic)BasicCardViewController *detailController;
你的AppDelegate.h中有什麼? –
立即發佈 – praks5432
ohhh發現它 - 我在RateView中導入應用程序delegate.h,我不需要它,我想這會導致一些循環依賴問題? – praks5432