這是我的代碼:第一缺少 '@end' // @end必須出現在Objective-C的情況下
Missing @end
Expected identifier or '('
:
#import <UIKit/UIKit.h>
@interface CustomCellArticle: UITableViewCell
@property(nonatomic,retain) IBOutlet UILabel *name;
@end
在我第一次收到此錯誤的代碼,它需要我在第一個添加@end來修復它。 代碼變成這個樣子:
#import <UIKit/UIKit.h>
@end //here the seconde error
@interface CustomCellArticle: UITableViewCell
@property(nonatomic,retain) IBOutlet UILabel *name;
@end
當我添加它,我收到一個新的錯誤:
@end must appear in an Objective-C context
我不知道發生了什麼究竟發生了,請幫忙! 我在另一個項目中使用了相同的類,它工作正常!
除UIKit之外,你還有其他#import嗎? – Kreiri
第二個是**絕對錯誤** –
在第一個,你可能有另一個@接口上面顯示的代碼.... –