Xcode は突然このエラーを表示しました:「不明な型名」
説明します: My StoriesViewController.h:
#import <UIKit/UIKit.h>
#import "Stories.h"
@interface StoriesViewController : UIViewController <UITextViewDelegate>
@property (strong) Stories *story; //Here it goes- "Unknown type name `Stories`"
@property (weak) IBOutlet UITextView *storyView;
@end
私のStories.hで:
#import <UIKit/UIKit.h>
#import "ViewController.h"
@interface Stories : UIDocument
@property (strong) NSString * storyContent;
@end
繰り返しますが、突然です。
前もって感謝します。
編集:
私のViewController.hで:
#import <UIKit/UIKit.h>
#import "Stories.h"
#import "StoriesViewController.h"
#import "StoriesPickerViewController.h"
#import <QuartzCore/QuartzCore.h>
@interface ViewController : UIViewController <UITextFieldDelegate, UIAlertViewDelegate> {
}
@end
NB @class は、ARC の問題を大量にスローします。
ViewController.h への無駄な参照を削除しました。解決しました!