使用xib自定义uiTableViewCell。我无法将标签连接到自定义状态表单元格

时间:2011-11-11 09:47:52

标签: ios uitableview

我刚刚创建了CustomTableViewCell.xib。然后我用CustomTableViewCell创建了课程IBOutlets。在身份检查器中,我将类型更改为CustomTableViewCell

 @interface CustomTableViewCell : UITableViewCell
{
IBOutlet NSString *placeName;
IBOutlet NSString *address;
IBOutlet NSString *distance;
}

@property (nonatomic, retain) IBOutlet NSString *placeName;
@property (nonatomic, retain) IBOutlet NSString *address;
@property (nonatomic, retain) IBOutlet NSString *distance;

@end

但我无法将标签连接到自定义状态表格单元格。请看截图。

enter image description here

1 个答案:

答案 0 :(得分:3)

也许您需要使用:

IBOutlet UILabel * placeNameLabel
...

代替。然后,在标签视图中设置文本。