| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // BusinessCollectionViewCell.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2017/5/3.
- // Copyright © 2017年 elongtian. All rights reserved.
- //
- #import "BusinessCollectionViewCell.h"
- @implementation BusinessCollectionViewCell
- /**
- 初始化
- @param frame <#frame description#>
- @return <#return value description#>
- */
- - (id)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if(self){
- [self InitView];
- }
- return self;
- }
- /**
- 初始化ui
- */
- - (void)InitView
- {
- _businessImgView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0,Screen_Width/4,60)];
- _businessImgView.contentMode = UIViewContentModeCenter;
- [self.contentView addSubview:_businessImgView];
- _businessTitleLbl = [UILabel new];
- _businessTitleLbl.frame=CGRectMake(0,CGRectGetMaxY(_businessImgView.frame)+5,Screen_Width/4, 25);
- _businessTitleLbl.font = [UIFont systemFontOfSize:13];
- _businessTitleLbl.textAlignment = NSTextAlignmentCenter;
- _businessTitleLbl.textColor = [UIColor blackColor];
- [self.contentView addSubview:_businessTitleLbl];
- }
- /**
- 设定model
- @param model <#model description#>
- */
- -(void) setBusinessInfoModel:(BusinessModel *)model{
- [_businessImgView setImage:[UIImage imageNamed:model.imageName]];
- _businessTitleLbl.text=model.imageTitle;
- }
- @end
|