我在我的表格視圖單元格上有一個圖像屬性。我想將此圖像填充到圖像中。如何在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
這不設置圖像。如何在單元類中設置此單元格的圖像?