我在我的表格视图单元格上有一个图像属性。我想将此图像填充到图像中。如何在iOS中设置表格视图单元格属性的初始值
我的手机是这样的:
//.h
@interface GAFriendStatusTableViewCell : PFTableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *friendImage;
@end
//.m
#import "GAFriendStatusTableViewCell.h"
@implementation GAFriendStatusTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.friendImage.image = [UIImage imageNamed:@"user.png"];
}
return self;
}
- (void)awakeFromNib
{
// Initialization code
}
@end
这不设置图像。如何在单元类中设置此单元格的图像?