【问题标题】:IBOutlet not showing in File's Owner/ IBIBOutlet 未显示在文件所有者/ IB 中
【发布时间】:2011-09-28 10:52:47
【问题描述】:

在我的 .h 文件中,我有这个:

@interface {
UILabel *questionLabel_;
}

@property (nonatomic, retain) IBOutlet UILabel *questionLabel;

在我的 .mm 文件中,我有这个:

@synthesize questionLabel = questionLabel_;

当我转到 xib 文件时,我在文件所有者中看不到 questionLabel 的证据。我也不能通过 ctrl 拖动到文件所有者或第一响应者来连接 UILabel。

虽然是在使用我创建的两个 UIButton。

想法?

【问题讨论】:

  • 你的接口文件中没有类名?
  • 在 Inspector 请检查类名是否设置?

标签: iphone objective-c xcode4 interface-builder iboutlet


【解决方案1】:

你应该为你的File's Owner.设置适当的类

打开Utilities -> Identity Inspector -> Custom Class -> Class -> Select your class

之后你就可以设置网点了。

【讨论】:

    猜你喜欢
    • 2016-11-19
    • 1970-01-01
    • 2014-08-23
    • 2016-10-24
    • 2014-07-13
    • 1970-01-01
    • 1970-01-01
    • 2015-04-18
    • 1970-01-01
    相关资源
    最近更新 更多