// // symbolCollectionCell.m // jiaPei // // Created by apple on 16/1/5. // Copyright © 2016年 JCZ. All rights reserved. // #import "symbolCollectionCell.h" @implementation symbolCollectionCell -(instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = backGroundColor; CGFloat width = (self.frame.size.width - 40)*1.0; _image = [[UIImageView alloc] initWithFrame:CGRectMake(20, 15, width, width)]; [self.contentView addSubview:_image]; _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, width + 20, width, self.frame.size.height - (width + 20))]; _nameLabel.textColor= kTitleColor; [_nameLabel setTextAlignment:NSTextAlignmentCenter]; _nameLabel.adjustsFontSizeToFitWidth = YES; _nameLabel.numberOfLines = 0; [self.contentView addSubview:_nameLabel]; } return self; } @end