iphone - 缺少'@end'//@end必须出现在Objective-C上下文中

标签 iphone ios objective-c xcode4.5

这是我的代码:

 #import <UIKit/UIKit.h>
   @interface CustomCellArticle: UITableViewCell
   @property(nonatomic,retain) IBOutlet UILabel *name;
   @end

我第一次收到此错误:
Missing @end
Expected identifier or '('

在代码的第一行中,它要求我在第一行中添加@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

我不知道到底怎么了,请帮忙!
我在另一个项目中使用了相同的类,效果很好!

最佳答案

是的,这是从另一个已经预先导入的头文件或实现文件中缺少的@end

可能是.h或.m文件

关于iphone - 缺少'@end'//@end必须出现在Objective-C上下文中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14397420/

相关文章:

iphone - 使用 Adob​​e Flex Builder 构建 iOS 应用程序 - 性能问题

ios - 在 ViewController 之间共享数据

ios - 如何在 iOS 中制作个人热点打开时使用的发光条效果?

objective-c - 以按钮为标题的 UINavigationBar。

iphone - 标题和栏按钮未显示在导航栏中

iphone - 核心数据获取值的总和。获取的属性与传播

php - 使用 Swift 连接到 PHP 服务器

ios - 有没有办法清除 uipickerview 选择?

iphone - 如何根据设备是 3G 还是非 3G 设备来禁止使用应用程序功能?

ios - __weak 是必需的吗?在这种情况下它有什么用?会不会漏?