17 - (id)initWithFrame:(CGRect)frame {
19 self = [
super initWithFrame:frame];
26 NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"Y4NutritionSelectedItemViewCell" owner:self options:nil];
28 if ([arrayOfViews count] < 1) {
32 if (![[arrayOfViews objectAtIndex:0] isKindOfClass:[UICollectionViewCell
class]]) {
43 CGRect imageFrame = CGRectMake(0.0, 0.0, 140.0, 148.0);
45 _imageView = [[UIImageView alloc] initWithFrame:imageFrame];
46 [
self.contentView addSubview:_imageView];
54 CGRect textFrame = CGRectMake(0.0, 148.0, 140.0, 40.0);
56 _textLabel = [[UILabel alloc] initWithFrame:textFrame];
57 _textLabel.backgroundColor = [UIColor colorWithRed:0.6f green:1.0f blue:0.3f alpha:1.0f];
64 [
self.contentView addSubview:_textLabel];
80 [
super prepareForReuse];
82 [
self.imageView removeFromSuperview];
83 [
self.textLabel removeFromSuperview];
IBOutlet UILabel * textLabel