//// GXFNoticeCollectionViewCell.m// XFFruit//// Created by freecui on 15/8/27.// Copyright (c) 2015年 Xummer. All rights reserved.//#import "GXFFunctionCollectionViewCell.h"@implementationGXFFunctionCollectionViewCell-(id)initWithFrame:(CGRect)frame{self=[superinitWithFrame:frame];if(!self){returnnil;}_functionImage=[[UIImageViewalloc]initWithFrame:CGRectMake((CGRectGetWidth(self.frame)-ICRFUNCTION_IMG_WIDTH)/2,ICRFUNCTION_IMG_TOP_PADDING,ICRFUNCTION_IMG_WIDTH,ICRFUNCTION_IMG_WIDTH)];_functionImage.backgroundColor=[UIColorclearColor];[self.contentViewaddSubview:_functionImage];_functionNameLabel=[[UILabelalloc]init];CGSizelabelSize=CGSizeMake(CGRectGetWidth(self.frame),ICRFUNCTION_LABEL_HEIGHT);labelSize=[_functionNameLabelsizeThatFits:labelSize];_functionNameLabel.frame=(CGRect){.origin.x=(CGRectGetWidth(self.frame)-labelSize.width)/2,.origin.y=CGRectGetMaxY(_functionImage.frame)+ICRFUNCTION_INNER_GAP,.size.width=labelSize.width,.size.height=ICRFUNCTION_LABEL_HEIGHT};_functionNameLabel.textColor=[UIColorcolorWithRed:0.596fgreen:0.596fblue:0.596falpha:1.00f];_functionNameLabel.textAlignment=NSTextAlignmentCenter;_functionNameLabel.font=[UIFontsystemFontOfSize:13];[self.contentViewaddSubview:_functionNameLabel];self.backgroundColor=[UIColorwhiteColor];returnself;}@end