iPhone / iOS:两次子类化UITableViewCell – >无法在InterfaceBuilder中引用父类的属性

我想在我的应用程序中使用具有图像的UITableViewCells,并且该图像是异步下载的。 为了实现这一点,并确保我不必在我的应用程序中多次编写相同的代码,我将子类化为UITableViewCell,如下所示:

#import  @interface ImageCell : UITableViewCell { UIImageView* imageView; } @property (nonatomic, retain) UIImageView* imageView; @end 

每当我需要一个带有图像的Cell时,我想像这样inheritanceImageCell:

 #import  #import "ImageCell.h" @interface StoreCell : ImageCell { UILabel* streetAddress; UILabel* retailerName; UILabel* distance; } @property (nonatomic, retain) IBOutlet UILabel* streetAddress; @property (nonatomic, retain) IBOutlet UILabel* retailerName; @property (nonatomic, retain) IBOutlet UILabel* distance; @end 

然而,这似乎不起作用。 由于StoreCell是ImageCell的子类,我不能再在InterfaceBuilder中引用属性“imageView”。

我在这里错过了什么吗? 这个子类化方案我试图完成并不意味着在Objective-C / iPhone OS中吗?

我认为您需要使用IBOutlet告诉界面构建者…所以

 @property (nonatomic, retain) IBOutlet UIImageView* imageView;