自定义了一个Cell继承UItableViewCell,在nib文件中拖入一个cell,把identifier改成了和cellForRowAtIndexPath方法里的复用标识符。
问题来了,我运行程序后,拖动cell,程序崩溃。报错-[UIImage isKindOfClass:]: message sent to deallocated instance 0x1d504c70
上代码:ChatCustomCell1.h
ChatCustomCell1.m
问题来了,我运行程序后,拖动cell,程序崩溃。报错-[UIImage isKindOfClass:]: message sent to deallocated instance 0x1d504c70
上代码:ChatCustomCell1.h
#import <UIKit/UIKit.h>
@interface ChatCustomCell1 : UITableViewCell
{
}
@property (retain, nonatomic) IBOutlet UIImageView *leftFaceImageView;
@property (retain, nonatomic) IBOutlet UIImageView *rigthFaceImageView;
@property (retain, nonatomic) IBOutlet UIImageView *messageBackImage;
@property (retain, nonatomic) IBOutlet UILabel *leftNameLable;
@property (retain, nonatomic) IBOutlet UILabel *rightNameLable;
@property (retain, nonatomic) IBOutlet UILabel *leftTimeLable;
@property (retain, nonatomic) IBOutlet UILabel *rightTimeLable;
@property (retain, nonatomic) IBOutlet UILabel *messageLable;
@end
ChatCustomCell1.m
#import "ChatCustomCell1.h"
@implementation ChatCustomCell1
@synthesize leftFaceImageView=_leftFaceImageView;
@synthesize rigthFaceImageView=_rigthFaceImageView;
@synthesize messageBackImage=_messageBackImage;
@synthesize leftNameLable=_leftNameLable;
@synthesize rightNameLable=_rightNameLable;
@synthesize leftTimeLable=_leftTimeLable;
@synthesize rightTimeLable=_rightTimeLable;
@synthesize messageLable=_messageLable;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end