// // PurchaseNoticeCell.m // XFFruit // // Created by mac on 15/8/18. // Copyright (c) 2015年 Xummer. All rights reserved. // #import "PurchaseNoticeCell.h" #define TitleSize 17 #define LeftMargin 15 #define TableHeight 46 #define TableWidth 60 #define LeftWidth 40 #define RightWidth 30 @implementation PurchaseNoticeCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.isSelected=NO; [self bulidLayout]; } return self; } - (void)bulidLayout { CGFloat gipWidth = (ScreenSize.width-4*TableWidth-(LeftMargin+20)-RightWidth)/3; self.HeardLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin * 2, 1))]; self.HeardLabel.backgroundColor = HexColor(@"e5e5e5"); self.HeardLabel.font = FontSize(TitleSize); self.FootLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.size.height-1, ScreenSize.width - LeftMargin * 2, 1))]; self.FootLabel.backgroundColor = HexColor(@"e5e5e5"); self.FootLabel.font = FontSize(TitleSize); self.arrowView=[[UIImageView alloc]initWithFrame:CGRectMake(LeftMargin, (TableHeight - 10)/2 , 10, 10)]; self.arrowView.image = [UIImage imageNamed:@"arrowright"]; self.arrowView.contentMode = UIViewContentModeScaleAspectFit; self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, TableWidth, TableHeight))]; self.SpLabel.textAlignment= NSTextAlignmentLeft; self.SpLabel.textColor = HexColor(@"666666"); self.SpLabel.font = FontSize(TitleSize); self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20+self.SpLabel.size.width+gipWidth , 0, TableWidth,TableHeight ))]; self.DjLabel.textAlignment= NSTextAlignmentLeft; self.DjLabel.textColor = HexColor(@"666666"); self.DjLabel.font = FontSize(TitleSize); self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(self.DjLabel.frame.origin.x+self.DjLabel.size.width+gipWidth, 0, TableWidth, TableHeight)]; self.BzggLabel.textAlignment= NSTextAlignmentLeft; self.BzggLabel.textColor = HexColor(@"666666"); self.BzggLabel.font = FontSize(TitleSize); self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(self.BzggLabel.frame.origin.x+self.BzggLabel.size.width+gipWidth, 0, TableWidth, TableHeight)]; self.BzslLabel.textAlignment= NSTextAlignmentLeft; self.BzslLabel.textColor = HexColor(@"666666"); self.BzslLabel.font = FontSize(TitleSize); self.SpLabel.text=@"1 西瓜"; self.DjLabel.text=@"0.8"; self.BzggLabel.text=@"1*12"; self.BzslLabel.text=@"100框"; self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, 50, ScreenSize.width, TableHeight*3)]; NSArray*array=[NSArray arrayWithObjects:@"包装规格",@"基础数量" ,@"包装单价",@"备注",nil]; NSArray*array1=[NSArray arrayWithObjects:@"包装数量",@"基础单价" ,@"总金额",nil]; for (int i=0; i