ProductCollectionPictureCell.m 2.06 KB
Newer Older
zhu's avatar
zhu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//
//  ProductCollectionPictureCell.m
//  Lighting
//
//  Created by mac on 16/5/18.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "ProductCollectionPictureCell.h"

@implementation ProductCollectionPictureCell
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
15
        self.backgroundColor=[UIColor whiteColor];
zhu's avatar
zhu committed
16
        self.productImageView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, 2*frame.size.height/3)];
zhu's avatar
zhu committed
17
        [self addSubview:self.productImageView];
18 19 20
        self.subView=[[UIView alloc]initWithFrame:CGRectMake(0, 2*frame.size.height/3, frame.size.width, frame.size.height/3)];
        [self.subView setBackgroundColor:[UIColor whiteColor]];
        [self addSubview:self.subView];
zhu's avatar
zhu committed
21
        //  产品描述
22
        self.productDesce=[[UILabel alloc]initWithFrame:CGRectMake(0,0, frame.size.width, frame.size.height/9)];
zhu's avatar
zhu committed
23
        self.productDesce.text=@"名称描述";
24 25
        self.productDesce.textColor=[UIColor grayColor];
        self.productDesce.font=[UIFont systemFontOfSize:12];
zhu's avatar
zhu committed
26
        self.productDesce.textAlignment=NSTextAlignmentCenter;
27
        [self.subView addSubview: self.productDesce];
zhu's avatar
zhu committed
28
      //  产品参数
29
        self.productParameter=[[UILabel alloc]initWithFrame:CGRectMake(0, frame.size.height/9, frame.size.width, frame.size.height/9)];
zhu's avatar
zhu committed
30
        self.productParameter.textAlignment=NSTextAlignmentCenter;
31 32 33
        self.productParameter.textColor=[UIColor grayColor];
        self.productParameter.font=[UIFont systemFontOfSize:12];
        [self.subView addSubview: self.productParameter];
zhu's avatar
zhu committed
34 35

        //  产品价格
36 37 38 39
        self.productPrice=[[UILabel alloc]initWithFrame:CGRectMake(0, 2*frame.size.height/9,frame.size.width, frame.size.height/9)];
        self.productPrice.textColor=[UIColor grayColor];
        self.productPrice.font=[UIFont systemFontOfSize:12];

zhu's avatar
zhu committed
40
        self.productPrice.textAlignment=NSTextAlignmentCenter;
41
        [self.subView addSubview: self.productPrice];
zhu's avatar
zhu committed
42
        self.productModel=[[TOGoodsEntity alloc]init];
zhu's avatar
zhu committed
43 44 45 46 47
    }
    return self;
}

@end