// // ChannelCollectCell.m // ThePaperDemo // // Created by Scar on 14-9-9. // Copyright (c) 2014年 scar1900. All rights reserved. // #import "ChannelCollectCell.h" #import "CollectionController.h" @interface ChannelCollectCell() @property(nonatomic, strong)CollectionController *collectVC; @end @implementation ChannelCollectCell @synthesize dataList = _dataList; - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { // Initialization code self.backgroundColor = [UIColor colorWithHexString:BackGroundColor]; self.clipsToBounds =YES; [self.contentView addSubview:self.collectVC.view]; for (id obj in self.subviews) { if ([obj respondsToSelector:@selector(setDelaysContentTouches:)]) { [obj setDelaysContentTouches:NO]; } } } return self; } - (void)layoutSubviews { [super layoutSubviews]; self.collectVC.view.frame = self.bounds; } - (CollectionController*)collectVC { if (!_collectVC) { _collectVC = [[CollectionController alloc]init]; } return _collectVC; } - (void)setDataList:(NSMutableArray *)data{ _dataList = data; self.backgroundColor = [UIColor colorWithHexString:BackGroundColor]; self.collectVC.dataList = data; } - (void)awakeFromNib { // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end