16 - (id)initWithFrame:(CGRect)frame {
18 self = [
super initWithFrame:frame];
27 CGSize imageSize = [imageSizeValue CGSizeValue];
28 CGRect imageFrame = CGRectMake(0.0, 0.0, imageSize.width, imageSize.height);
29 _imageView = [[UIImageView alloc] initWithFrame:imageFrame];
31 [
self.contentView addSubview:_imageView];
40 CGSize imageSize = [imageSizeValue CGSizeValue];
41 float textWidth = 144.0;
42 float textHeight = 38.0;
43 float textLeft = imageSize.width - textWidth;
44 float textTop = imageSize.height - textHeight;
45 CGRect textFrame = CGRectMake(textLeft, textTop, textWidth, textHeight);
46 _textLabel = [[UILabel alloc] initWithFrame:textFrame];
47 _textLabel.backgroundColor = [UIColor colorWithRed:0.3f green:1.0f blue:0.7f alpha:1.0f];
48 _textLabel.textAlignment = NSTextAlignmentCenter;
49 _textLabel.font = [UIFont fontWithName:@"Verdana" size:10.0f];
52 [
self.contentView addSubview:_textLabel];
61 [
super prepareForReuse];
63 [
self.imageView removeFromSuperview];
64 [
self.textLabel removeFromSuperview];
NSValue * mealCellDefaultSize()