ProductCollectionPictureCell.m 2.07 KB
//
//  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) {
        self.backgroundColor=[UIColor whiteColor];
        self.productImageView =[[UIImageView alloc]initWithFrame:CGRectMake(15, 0, frame.size.width-30, 2*frame.size.height/3)];
        [self addSubview:self.productImageView];
        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];
        //  产品描述
        self.productDesce=[[UILabel alloc]initWithFrame:CGRectMake(0,0, frame.size.width, frame.size.height/9)];
        self.productDesce.text=@"名称描述";
        self.productDesce.textColor=[UIColor grayColor];
        self.productDesce.font=[UIFont systemFontOfSize:12];
        self.productDesce.textAlignment=NSTextAlignmentCenter;
        [self.subView addSubview: self.productDesce];
      //  产品参数
        self.productParameter=[[UILabel alloc]initWithFrame:CGRectMake(0, frame.size.height/9, frame.size.width, frame.size.height/9)];
        self.productParameter.textAlignment=NSTextAlignmentCenter;
        self.productParameter.textColor=[UIColor grayColor];
        self.productParameter.font=[UIFont systemFontOfSize:12];
        [self.subView addSubview: self.productParameter];

        //  产品价格
        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];

        self.productPrice.textAlignment=NSTextAlignmentCenter;
        [self.subView addSubview: self.productPrice];
        self.productModel=[[TOGoodsEntity alloc]init];
    }
    return self;
}

@end