Xcode 解析问题,@end必须出现在上下文中
我正在尝试构建这个应用程序,每次我尝试构建它时,它总是给我一个解析错误Xcode 解析问题,@end必须出现在上下文中,xcode,parsing,Xcode,Parsing,我正在尝试构建这个应用程序,每次我尝试构建它时,它总是给我一个解析错误 #import "XYZFlipsideViewController.h" @end <===This is the error. It says: '@end' must appear in an Objective-C context @interface XYZMainViewController : UIViewController <XYZFlipsideViewControllerDelega
#import "XYZFlipsideViewController.h"
@end <===This is the error. It says: '@end' must appear in an Objective-C context
@interface XYZMainViewController : UIViewController <XYZFlipsideViewControllerDelegate,
UIPopoverControllerDelegate>
@property (strong, nonatomic) IBOutlet UIWebView *viewWeb;
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) UIPopoverController *flipsidePopoverController;
@end
但是它总是给我更多的错误。第一个错误不属于那里。删除后会出现什么错误?找不到接口声明,属性实现必须有它的声明,不能使用“super”,因为它的根类,使用了未声明的标识符,找不到属性“flipsidePopoverController”,并重复了一些错误。是否在
.m
文件中定义接口?您通常希望在头文件(.h
)中执行此操作。错误在.h文件中。一定要去掉前导的@end
。但是对于您的这个.h文件,您至少需要在@界面
之前(或者在.pch
文件中)有一行#import
。您可能还希望在.pch
文件中导入,否则可能会在NS
类中出错。
@end