Commit 7a9a4c75 authored by mei's avatar mei

各个界面优化 及购物车添加更改 商品更改 场景更改

parent 479abba0
......@@ -14,7 +14,7 @@
//回调
- (void)addCustomPictureImage:(UIImage *)image ;
- (void)restCamerBtnImage;
@end
......
......@@ -157,6 +157,9 @@
-(void)DismissScreenView
{
if (self) {
if ([self.delegate respondsToSelector:@selector(restCamerBtnImage)]) {
[self.delegate restCamerBtnImage];
}
[self.view removeFromSuperview];
}
}
......@@ -166,6 +169,9 @@
if (point.x<self.subView.frame.origin.x || point.x >self.subView.frame.origin.x+self.subView.frame.size.width||point.y<self.subView.frame.origin.y||point.y>self.subView.frame.origin.y+self.subView.frame.size.height) {
if (self) {
if ([self.delegate respondsToSelector:@selector(restCamerBtnImage)]) {
[self.delegate restCamerBtnImage];
}
[self.view removeFromSuperview];
}
}
......
......@@ -15,6 +15,7 @@
#import "ShoppingView.h"
#import "ShareViewController.h"
#import "CameraView.h"
#import "HelpViewController.h"
@protocol FollowHeartViewAddpicturedelegate <NSObject>
@required
......@@ -24,7 +25,7 @@
@end
@interface FollowHeartViewController : BaseViewController<LeftViewBtnClickdelegate,RightViewBtnClickdelegate,FootViewBtnClickdelegate,UIGestureRecognizerDelegate,AddSecenePicturedelegate,AddProductPicturedelegate,SharePicturedelegate,AddCustomPicturedelegate>
@interface FollowHeartViewController : BaseViewController<LeftViewBtnClickdelegate,RightViewBtnClickdelegate,FootViewBtnClickdelegate,UIGestureRecognizerDelegate,AddSecenePicturedelegate,AddProductPicturedelegate,SharePicturedelegate,AddCustomPicturedelegate,Shoppingdelegate>
@property (nonatomic,assign) id<FollowHeartViewAddpicturedelegate> delegate;
@property (nonatomic,strong) LeftSubView *leftSubView;
@property (nonatomic,strong) RightSubView *rightSubView;
......@@ -33,6 +34,7 @@
@property (nonatomic,strong) ProductLibraryView *productLibraryView;
@property (nonatomic,strong) ShoppingView *shoppingView;
@property (nonatomic,strong) CameraView *cameraView;
@property (nonatomic,strong) HelpViewController *helpView;
@property (nonatomic,strong) UIImageView *backGroundImageView;
@property (nonatomic,strong) UIButton *zoomButton;
@property (nonatomic,strong) UIButton *temporaryBtn;
......
......@@ -74,16 +74,24 @@
break;
case 105: //帮助
{
[self addHelpView:button];
}
break;
case 200: //场景
{
if (!self.footSubView.isSelected) {
[self.footSubView.selectBtn setBackgroundImage:[UIImage imageNamed:@"场景1"] forState:UIControlStateNormal];
self.footSubView.isSelected=YES;
}
[self addSceneLibraryView];
}
break;
case 300: //产品
{
if (!self.rightSubView.isSelected) {
[self.rightSubView.selectBtn setBackgroundImage:[UIImage imageNamed:@"产品1"] forState:UIControlStateNormal];
self.rightSubView.isSelected=YES;
}
[self addProductLibraryView];
}
break;
......@@ -95,6 +103,7 @@
}
-(void)addShareView:(UIButton *)sender
{
[self.leftSubView.shareBtn setBackgroundImage:[UIImage imageNamed:@"selectShare"] forState:UIControlStateNormal];
ShareViewController *shareVC = [[ShareViewController alloc]init];
shareVC.delegate = self;
shareVC.preferredContentSize = CGSizeMake(280, 150);
......@@ -110,6 +119,7 @@
//添加自定义场景
-(void)addCameraView:(UIButton *)sender
{
[self.leftSubView.camerBtn setBackgroundImage:[UIImage imageNamed:@"selectCamer"] forState:UIControlStateNormal];
self.cameraView=[[CameraView alloc]init];
self.cameraView.view.backgroundColor=[UIColor clearColor];
self.cameraView.delegate=self;
......@@ -129,7 +139,8 @@
//添加产品图
- (void)resetSubProductImage:(UIImage*)image productModel:(NSMutableArray *)productModel
{
ImageCropperView *cropper=[[ImageCropperView alloc]initWithFrame:CGRectMake(400, 300, 300, 300)];
self.productModelArray=productModel;
ImageCropperView *cropper=[[ImageCropperView alloc]initWithFrame:CGRectMake(400, 200, 300, 225)];
cropper.image = image;
[self.view addSubview:cropper];
}
......@@ -152,7 +163,7 @@
//全屏
-(void)setViewAnimations:(UIButton *)sender
{
self.zoomButton=sender;
self.zoomButton=self.leftSubView.fullViewBtn;
self.zoomButton.hidden=YES;
self.temporaryBtn=[UIButton buttonWithType:UIButtonTypeCustom];
self.temporaryBtn.frame=sender.frame;
......@@ -169,6 +180,15 @@
self.temporaryBtn.frame=CGRectMake(sender.frame.origin.x, 20, sender.frame.size.width, sender.frame.size.height);
[UIView commitAnimations];
}
-(void)addHelpView:(UIButton *)btn
{
self.helpView=[[HelpViewController alloc]init];
self.helpView.view.backgroundColor=[UIColor clearColor];
// self.helpView.delegate=self;
[self.view addSubview:self.helpView.view];
}
-(void)resetViewDidSelected:(UIButton *)sender
{
[sender setBackgroundImage:[UIImage imageNamed:@"quanping"] forState:UIControlStateNormal];
......@@ -208,10 +228,11 @@
//添加购物车
-(void)addShoppingView
{
[self.leftSubView.shoppingBtn setBackgroundImage:[UIImage imageNamed:@"selectshoping"] forState:UIControlStateNormal];
self.shoppingView=[[ShoppingView alloc]init];
self.shoppingView.view.backgroundColor=[UIColor clearColor];
self.shoppingView.productModelArray=self.productModelArray;
// self.shoppingView.delegate=self;
self.shoppingView.delegate=self;
[self.view addSubview:self.shoppingView.view];
}
......@@ -220,6 +241,7 @@
-(void)savePhoto
{
[self setViewAnimations:self.leftSubView.fullViewBtn];
UIImage * image = [self captureImageFromView:self.view];
[self saveImageToPhotos:image];
......@@ -281,6 +303,35 @@
return image;
}
//重置场景图标
- (void)restSeceneBtnImage
{
if (self.footSubView.isSelected) {
[self.footSubView.selectBtn setBackgroundImage:[UIImage imageNamed:@"场景2"] forState:UIControlStateNormal];
self.footSubView.isSelected=NO;
}
[self.seceneLibraryView.view removeFromSuperview];
}
//重置产品图标
- (void)restProductBtnImage
{
if (self.rightSubView.isSelected) {
[self.rightSubView.selectBtn setBackgroundImage:[UIImage imageNamed:@"产品2"] forState:UIControlStateNormal];
self.rightSubView.isSelected=NO;
}
[self.productLibraryView.view removeFromSuperview];
}
//购物
- (void)restShoppingBtnImage
{
[self.leftSubView.shoppingBtn setBackgroundImage:[UIImage imageNamed:@"gouwuche"] forState:UIControlStateNormal];
}
//重置相机图片
- (void)restCamerBtnImage
{
[self.leftSubView.camerBtn setBackgroundImage:[UIImage imageNamed:@"customchangjing"] forState:UIControlStateNormal];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
......@@ -288,7 +339,6 @@
}
/*
#pragma mark - Navigation
......
......@@ -20,7 +20,8 @@
@property (nonatomic,assign) id<FootViewBtnClickdelegate> delegate;
@property (nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,strong)NSMutableArray *dataArray;
@property (nonatomic,assign)BOOL isSelected;
@property (nonatomic,strong)UIButton *selectBtn;
-(void)addFootSubViewImage:(UIImage*)image;
@end
......@@ -21,19 +21,19 @@
-(void)initdata
{
NSString *imageName = [NSString stringWithFormat:@"backView" ];
UIImage *image=[UIImage imageNamed:imageName];
self.dataArray=[[NSMutableArray alloc]initWithObjects:image,image,image,nil];
// NSString *imageName = [NSString stringWithFormat:@"backView" ];
// UIImage *image=[UIImage imageNamed:imageName];
self.dataArray=[[NSMutableArray alloc]init];
// 待接收
}
-(void)initSubView
{
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.frame=CGRectMake(30, 50, 60, 60);
[button setBackgroundImage:[UIImage imageNamed:@"场景1"] forState:UIControlStateNormal];
button.tag=200;
[button addTarget:self action:@selector(footBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
self.selectBtn=[UIButton buttonWithType:UIButtonTypeCustom];
self.selectBtn.frame=CGRectMake(30, 50, 60, 60);
[self.selectBtn setBackgroundImage:[UIImage imageNamed:@"场景2"] forState:UIControlStateNormal];
self.selectBtn.tag=200;
[self.selectBtn addTarget:self action:@selector(footBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.selectBtn];
self.scrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(100, 0, self.frame.size.width-100, self.frame.size.height)];
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self.scrollView.showsHorizontalScrollIndicator = NO;
......@@ -47,7 +47,7 @@
[self.scrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
self.scrollView.contentSize = CGSizeMake((self.dataArray.count+1) * (100+10), 0);
for (int i=0; i<self.dataArray.count; i++) {
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(i*(100+10), 30, 100, 100)];
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(i*(125+10), 30, 125, 100)];
UIImage *image=[self.dataArray objectAtIndex:i];
[button setImage:image forState:UIControlStateNormal];
button.tag=100+i;
......
//
// HelpViewController.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface HelpViewController : BaseViewController<UIGestureRecognizerDelegate>
@end
//
// HelpViewController.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "HelpViewController.h"
@interface HelpViewController ()
@end
@implementation HelpViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self initView];
}
-(void)initView
{
//点击手势
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView:)];
tap.delegate = self;
tap.cancelsTouchesInView = NO;
[[UIApplication sharedApplication].keyWindow addGestureRecognizer:tap];
}
//取消当前页面点击手势
-(void)DismissScreenView:(UITapGestureRecognizer*)sender{
// CGPoint point = [sender locationInView:self.view];
if (self) {
[self.view removeFromSuperview];
}
}
@end
......@@ -19,4 +19,12 @@
@interface LeftSubView : UIView
@property (nonatomic,assign) id<LeftViewBtnClickdelegate> delegate;
@property (nonatomic,strong)NSMutableArray *dataArray;
@property (nonatomic,strong)NSMutableArray *helpArray;
@property (nonatomic,strong)UIButton *fanHuiBtn;//返回
@property (nonatomic,strong)UIButton *shoppingBtn;//购物车
@property (nonatomic,strong)UIButton *shareBtn;//分享
@property (nonatomic,strong)UIButton *camerBtn;//自定义场景
@property (nonatomic,strong)UIButton *fullViewBtn;//全屏
@property (nonatomic,strong)UIButton *helpBtn;//帮助
@end
......@@ -21,6 +21,7 @@
-(void)initdata
{
self.dataArray=[[NSMutableArray alloc]initWithObjects:@"返回",@"购物车",@"分享",@"自定义场景",@"全屏",@"帮助", nil];
self.helpArray=[[NSMutableArray alloc]initWithObjects:@"返回",@"添加至购物袋",@"分享方案",@"自定义场景",@"全屏",@"帮助", nil];
}
-(void)initSubView
{
......@@ -29,30 +30,42 @@
button.tag=100+i;
button.frame=CGRectMake(30, 30+(60 +15)*i, 60, 60);
[button addTarget:self action:@selector(leftBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
switch (i) {
case 0:
{
[button setBackgroundImage:[UIImage imageNamed:@"reBackBtn"] forState:UIControlStateNormal];
self.fanHuiBtn=button;//返回
// UIView *view=[[UIView alloc]initWithFrame:CGRectMake(100, 30+(60 +15)*i+10, 100, 40)];
// view.backgroundColor=[UIColor whiteColor];
// UILabel *lable=
// [self addSubview:view];
}
break;
case 1:
[button setBackgroundImage:[UIImage imageNamed:@"gouwuche"] forState:UIControlStateNormal];
self.shoppingBtn=button;//购物车
break;
case 2:
[button setBackgroundImage:[UIImage imageNamed:@"fenxiang"] forState:UIControlStateNormal];
self.shareBtn=button;//分享
break;
case 3:
[button setBackgroundImage:[UIImage imageNamed:@"customchangjing"] forState:UIControlStateNormal];
self.camerBtn=button;//自定义场景
break;
case 4:
[button setBackgroundImage:[UIImage imageNamed:@"quanping"] forState:UIControlStateNormal];
self.fullViewBtn=button;//全屏
break;
case 5:
[button setBackgroundImage:[UIImage imageNamed:@"bangzhu"] forState:UIControlStateNormal];
self.helpBtn=button;//帮助
break;
default:
......@@ -68,6 +81,7 @@
[self.delegate buttonClick:sender.tag withButton:sender];
}
}
/*
// Only override drawRect: if you perform custom drawing.
......
......@@ -22,6 +22,7 @@
@property (strong, nonatomic) UILabel *productDesce;
@property (strong, nonatomic) TOGoodsEntity *productModel;
@property (strong, nonatomic) UIView *subView;
......
......@@ -12,22 +12,33 @@
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor=[UIColor whiteColor];
self.productImageView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, 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,2*frame.size.height/3, frame.size.width, frame.size.height/6)];
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 addSubview: self.productDesce];
[self.subView addSubview: self.productDesce];
// 产品参数
self.productParameter=[[UILabel alloc]initWithFrame:CGRectMake(0, 2*frame.size.height/3+ frame.size.height/6, frame.size.width, frame.size.height/6)];
self.productParameter=[[UILabel alloc]initWithFrame:CGRectMake(0, frame.size.height/9, frame.size.width, frame.size.height/9)];
self.productParameter.textAlignment=NSTextAlignmentCenter;
[self addSubview: self.productParameter];
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/3+ 2*frame.size.height/6, frame.size.width, frame.size.height/6)];
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 addSubview: self.productPrice];
[self.subView addSubview: self.productPrice];
self.productModel=[[TOGoodsEntity alloc]init];
}
return self;
......
......@@ -14,6 +14,7 @@
//回调
- (void)addProductImage:(UIImage *)image productModel:(TOGoodsEntity*)productModel;
- (void)restProductBtnImage;
@end
......@@ -44,6 +45,23 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property (nonatomic,assign) int indexPage;
// 搜索code
@property (nonatomic,copy) NSString *selectedCode;
/**
* 筛选模型
*/
@property (nonatomic,strong) GoodsCondition *condtionModel;
/**
* 总页数
*/
@property (nonatomic,assign) int totalPages;
/**
* 当前筛选按钮选中状态
*/
@property (nonatomic,assign) NSInteger selectedIndex;
@property (nonatomic,strong) NSMutableArray * cellArray;
@property (nonatomic,strong) NSMutableArray * showSection;
@property (nonatomic,strong) NSMutableArray * typeBtnArray;
@property (nonatomic,strong) NSMutableArray * sectionBtnArray;
@property (nonatomic,strong) NSMutableArray * cellBtnArray;
@property (nonatomic,strong)UITextField * searchTextField;
@end
This diff is collapsed.
......@@ -20,5 +20,7 @@
@property (nonatomic,strong)NSMutableArray *dataArray;
@property (nonatomic,strong)NSMutableArray *productModelArray;
@property (nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,assign)BOOL isSelected;
@property (nonatomic,strong)UIButton *selectBtn;
-(void)addRightSubViewImage:(UIImage*)image productModel:(TOGoodsEntity *)productModel;
@end
......@@ -22,19 +22,19 @@
{
NSString *imageName = [NSString stringWithFormat:@"05产品库-详情_03" ];
UIImage *image= [UIImage imageNamed:imageName];
self.dataArray=[[NSMutableArray alloc]initWithObjects:image,image,image,nil];
self.dataArray=[[NSMutableArray alloc]init];
self.productModelArray=[[NSMutableArray alloc]init];
// 待接收
}
-(void)initSubView
{
UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
button.frame=CGRectMake(self.frame.size.width-100, self.frame.size.height-60, 60, 60);
button.tag=300;
[button setBackgroundImage:[UIImage imageNamed:@"产品1"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(rightBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:button];
self.selectBtn=[UIButton buttonWithType:UIButtonTypeCustom];
self.selectBtn.frame=CGRectMake(self.frame.size.width-100, self.frame.size.height-60, 60, 60);
self.selectBtn.tag=300;
[self.selectBtn setBackgroundImage:[UIImage imageNamed:@"产品2"] forState:UIControlStateNormal];
[self.selectBtn addTarget:self action:@selector(rightBtnDidSelected:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.selectBtn];
self.scrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height-100)];
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self.scrollView.showsVerticalScrollIndicator = NO;
......@@ -48,7 +48,7 @@
self.scrollView.contentSize = CGSizeMake(0, (self.dataArray.count+1) * (100+10));
for (int i=0; i<self.dataArray.count; i++) {
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(80, 20+i*(100+10), 100, 100)];
UIButton *button=[[UIButton alloc]initWithFrame:CGRectMake(80, 20+i*(100+10), 100, 75)];
UIImage *image=[self.dataArray objectAtIndex:i];
[button setImage:image forState:UIControlStateNormal];
button.tag=100+i;
......
//
// SecenTableViewCell.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SecenTableViewCell : UITableViewCell
@end
//
// SecenTableViewCell.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "SecenTableViewCell.h"
@implementation SecenTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(0, self.frame.size.height, self.frame.size.width, 1)];
lable.backgroundColor=[UIColor grayColor];
[self addSubview:lable];
}
@end
......@@ -9,13 +9,14 @@
#import <UIKit/UIKit.h>
#import "SeceneCollectionPictureCell.h"
#import "screeningButton.h"
#import "SecenTableViewCell.h"
@protocol AddSecenePicturedelegate <NSObject>
@required
//回调
- (void)addSeceneImage:(UIImage *)image;
- (void)restSeceneBtnImage;
@end
@interface SeceneLibraryView : BaseViewController<UIGestureRecognizerDelegate,UITableViewDelegate,UITableViewDataSource,UICollectionViewDataSource,
......@@ -42,4 +43,14 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
* 当前页数
*/
@property (nonatomic,assign) int indexPage;
/**
* 总页数
*/
@property (nonatomic,assign) int totalPages;
/**
* 搜索模型
*/
@property (nonatomic,strong) SceneCondition *conditionModel;
@property (nonatomic,strong) NSString *isSelectBtnType;
@property (nonatomic ,strong)NSString *isSelectCell;
@end
This diff is collapsed.
......@@ -61,6 +61,8 @@
*/
@property (nonatomic,strong) ShopcarModel *model;
@property (nonatomic,assign) int value;
/**
* 传入cel下标
......
......@@ -7,8 +7,8 @@
//
#import "ShoppingCell.h"
#define Width 800
#define Height self.frame.size.height
#define Width 760
#define Height 90
#define Gap 5
@implementation ShoppingCell
......@@ -16,7 +16,7 @@
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.value=1;
[self bulidLayout];
}
return self;
......@@ -25,52 +25,95 @@
- (void)bulidLayout
{
// 选中
self.selectedButton=[[UIButton alloc]initWithFrame:CGRectMake(10, 10, Width/15-20, Height-20)];
self.selectedButton=[[UIButton alloc]initWithFrame:CGRectMake(20, 25, Width/12-40, Height-50)];
[self.selectedButton setBackgroundImage:[UIImage imageNamed:@"box-副本"] forState:UIControlStateNormal];
// box-副本
[self.contentView addSubview:self.selectedButton];
// 商品图片
self.goodsImageView=[[UIImageView alloc]initWithFrame:CGRectMake(Width/15, 0, 2*Width/15, Height)];
self.goodsImageView=[[UIImageView alloc]initWithFrame:CGRectMake(Width/12, 0, 2*Width/12, Height)];
self.goodsImageView.image=[UIImage imageNamed:@"05产品库-详情_03"];
//05产品库-详情_03
[self.contentView addSubview:self.goodsImageView];
// 商品信息
self.goodsInformationLabe=[[UILabel alloc]initWithFrame:CGRectMake(3*Width/15, 0, 3*Width/15, Height)];
self.goodsInformationLabe=[[UILabel alloc]initWithFrame:CGRectMake(3*Width/12, 0, 4*Width/12, Height)];
self.goodsInformationLabe.text=@"吊灯jkdsfhkdhfkdsh\n2000133434";
self.goodsInformationLabe.textAlignment=NSTextAlignmentCenter;
self.goodsInformationLabe.numberOfLines=0;
[self.contentView addSubview:self.goodsInformationLabe];
// 吊牌价格
self.tagsPriceLabe=[[UILabel alloc]initWithFrame:CGRectMake(6*Width/15, 0,2*Width/15, Height)];
self.tagsPriceLabe.text=@"$5500";
self.tagsPriceLabe=[[UILabel alloc]initWithFrame:CGRectMake(7*Width/12, 0,2*Width/12, Height)];
self.tagsPriceLabe.text=@"¥5500";
self.tagsPriceLabe.textAlignment=NSTextAlignmentCenter;
[self.contentView addSubview:self.tagsPriceLabe];
// 成交价格
self.clinchTextfield=[[UITextField alloc]initWithFrame:CGRectMake(8*Width/15, 0, 2*Width/15, Height)];
self.clinchTextfield.text=@"$5500";
[self.contentView addSubview:self.clinchTextfield];
//// 成交价格
// self.clinchTextfield=[[UITextField alloc]initWithFrame:CGRectMake(8*Width/15, 0, 2*Width/15, Height)];
// self.clinchTextfield.text=@"$5500";
// [self.contentView addSubview:self.clinchTextfield];
// 数量减
self.reduceButton=[[UIButton alloc]initWithFrame:CGRectMake(10*Width/15, 0, Width/15, Height)];
self.reduceButton=[[UIButton alloc]initWithFrame:CGRectMake(9*Width/12, 20, Width/12-5, Height-40)];
[self.reduceButton setTitle:@"-" forState:UIControlStateNormal];
self.reduceButton.titleLabel.font=[UIFont systemFontOfSize:18];
self.reduceButton.backgroundColor=RGB(249, 244, 241, 1);
[self.reduceButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
self.reduceButton.titleLabel.font= [UIFont systemFontOfSize: 18.0];
self.reduceButton.tag=100;
[self.reduceButton addTarget:self action:@selector(resetVale:) forControlEvents:UIControlEventTouchUpInside];
[self.contentView addSubview:self.reduceButton];
// 商品数量
self.goodsNumbersLabe=[[UILabel alloc]initWithFrame:CGRectMake(11*Width/15, 0, Width/15, Height)];
self.goodsNumbersLabe.text=@"1";
self.goodsNumbersLabe=[[UILabel alloc]initWithFrame:CGRectMake(10*Width/12, 20, Width/12, Height-40)];
self.goodsNumbersLabe.text=[NSString stringWithFormat:@"%d",self.value];
self.goodsNumbersLabe.layer.masksToBounds = YES;
self.goodsNumbersLabe.layer.cornerRadius=5;
self.goodsNumbersLabe.layer.borderWidth=1;
self.goodsNumbersLabe.layer.borderColor=[UIColor grayColor].CGColor;
self.goodsNumbersLabe.textAlignment=NSTextAlignmentCenter;
[self.contentView addSubview:self.goodsNumbersLabe];
// 数量加
self.addButton=[[UIButton alloc]initWithFrame:CGRectMake(12*Width/15, 0, Width/15, Height)];
self.addButton=[[UIButton alloc]initWithFrame:CGRectMake(11*Width/12+5, 20, Width/12-5, Height-40)];
[self.addButton setTitle:@"+" forState:UIControlStateNormal];
self.addButton.titleLabel.font=[UIFont systemFontOfSize:18];
self.addButton.backgroundColor=RGB(249, 244, 241, 1);
[self.addButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
self.addButton.titleLabel.font= [UIFont systemFontOfSize: 18.0];
self.addButton.tag=200;
[self.addButton addTarget:self action:@selector(resetVale:) forControlEvents:UIControlEventTouchUpInside];
[self.contentView addSubview:self.addButton];
// 产品金额
self.productPriceLabe=[[UILabel alloc]initWithFrame:CGRectMake(13*Width/15, 0, 2*Width/15, Height)];
self.productPriceLabe.text=@"$5500";
self.productPriceLabe.textColor=[UIColor redColor];
[self.contentView addSubview:self.productPriceLabe];
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(15, Height-1, Width-20, 1)];
lable.backgroundColor=[UIColor grayColor];
[self.contentView addSubview:lable];
//// 产品金额
// self.productPriceLabe=[[UILabel alloc]initWithFrame:CGRectMake(13*Width/15, 0, 2*Width/15, Height)];
// self.productPriceLabe.text=@"$5500";
// self.productPriceLabe.textColor=[UIColor redColor];
// [self.contentView addSubview:self.productPriceLabe];
}
-(void)resetVale:(UIButton *)sender
{
switch (sender.tag) {
case 100://减少
{
if (self.value<=1) {
return;
}else
{
self.value-=1;
}
}
break;
case 200://增加
{
self.value+=1;
}
break;
default:
break;
}
self.goodsNumbersLabe.text=[NSString stringWithFormat:@"%d",self.value];
}
- (void)awakeFromNib {
[super awakeFromNib];
......
......@@ -8,8 +8,16 @@
#import "BaseViewController.h"
#import "ShoppingCell.h"
//#import "TOGoodsEntity.h"
@protocol Shoppingdelegate <NSObject>
@required
- (void)restShoppingBtnImage;
@end
@interface ShoppingView : BaseViewController<UIGestureRecognizerDelegate,UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,assign) id<Shoppingdelegate> delegate;
@property (nonatomic,strong) UIView *subView;
@property (nonatomic,strong) UIView *headerView;
@property (nonatomic,strong) UIView *toolView;
......@@ -17,6 +25,9 @@
@property (nonatomic,strong) NSMutableArray *nameDataArray;
@property (nonatomic,strong) NSMutableArray *productModelArray;
@property (nonatomic,strong) NSMutableArray *selectTagArray;
@property (nonatomic,strong) NSMutableArray *AddArray;
@property (nonatomic,strong) UITableView *shoppingTableView;
@property (nonatomic,assign) BOOL isAllSelected;
@property (nonatomic,strong) UIButton*allSelectBtn;
@property (nonatomic,strong) UIButton *confirmAddBtn;
@end
\ No newline at end of file
This diff is collapsed.
......@@ -26,6 +26,8 @@
04A14A251CE0FC3A00DAD5F3 /* LeftSubView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A14A241CE0FC3A00DAD5F3 /* LeftSubView.m */; };
04A14A281CE0FC5600DAD5F3 /* RightSubView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A14A271CE0FC5600DAD5F3 /* RightSubView.m */; };
04A14A2B1CE0FC7F00DAD5F3 /* FootSubView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A14A2A1CE0FC7F00DAD5F3 /* FootSubView.m */; };
04F662141CFB700B00384248 /* SecenTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F662131CFB700B00384248 /* SecenTableViewCell.m */; };
04F662171CFB9F4A00384248 /* HelpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F662161CFB9F4A00384248 /* HelpViewController.m */; };
04F9EE181CF2235000BD729F /* ShoppingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F9EE171CF2235000BD729F /* ShoppingView.m */; };
04F9EE1B1CF22B5900BD729F /* ShoppingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F9EE1A1CF22B5900BD729F /* ShoppingCell.m */; };
04F9EE1E1CF25F7300BD729F /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F9EE1D1CF25F7300BD729F /* ShareViewController.m */; };
......@@ -175,6 +177,10 @@
04A14A271CE0FC5600DAD5F3 /* RightSubView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RightSubView.m; sourceTree = "<group>"; };
04A14A291CE0FC7F00DAD5F3 /* FootSubView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FootSubView.h; sourceTree = "<group>"; };
04A14A2A1CE0FC7F00DAD5F3 /* FootSubView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FootSubView.m; sourceTree = "<group>"; };
04F662121CFB700B00384248 /* SecenTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecenTableViewCell.h; sourceTree = "<group>"; };
04F662131CFB700B00384248 /* SecenTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecenTableViewCell.m; sourceTree = "<group>"; };
04F662151CFB9F4A00384248 /* HelpViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpViewController.h; sourceTree = "<group>"; };
04F662161CFB9F4A00384248 /* HelpViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpViewController.m; sourceTree = "<group>"; };
04F9EE161CF2235000BD729F /* ShoppingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingView.h; sourceTree = "<group>"; };
04F9EE171CF2235000BD729F /* ShoppingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingView.m; sourceTree = "<group>"; };
04F9EE191CF22B5900BD729F /* ShoppingCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoppingCell.h; sourceTree = "<group>"; };
......@@ -474,6 +480,8 @@
04F9EE1D1CF25F7300BD729F /* ShareViewController.m */,
041636BC1CF377F4008CE961 /* CameraView.h */,
041636BD1CF377F4008CE961 /* CameraView.m */,
04F662151CFB9F4A00384248 /* HelpViewController.h */,
04F662161CFB9F4A00384248 /* HelpViewController.m */,
);
name = subView;
sourceTree = "<group>";
......@@ -507,6 +515,8 @@
044CD6F01CEB81350004A715 /* ProductCollectionPictureCell.m */,
04F9EE191CF22B5900BD729F /* ShoppingCell.h */,
04F9EE1A1CF22B5900BD729F /* ShoppingCell.m */,
04F662121CFB700B00384248 /* SecenTableViewCell.h */,
04F662131CFB700B00384248 /* SecenTableViewCell.m */,
);
name = customCell;
sourceTree = "<group>";
......@@ -1471,6 +1481,7 @@
2992493D1CDB3E8900786B1E /* GenerateOrdersModifyTableViewCell.m in Sources */,
29BB27741CD9DFAC009A0813 /* SceneLibraryViewController.m in Sources */,
29E384D11CE9C65700888199 /* SearchViewController.m in Sources */,
04F662171CFB9F4A00384248 /* HelpViewController.m in Sources */,
2928F8421CD0ABAC0036D761 /* ShoppingViewController.m in Sources */,
29698D611CE2C11500D72CE7 /* SettlementViewController.m in Sources */,
299876331CD997DF00C90D0A /* OrderInformationTableViewCell.m in Sources */,
......@@ -1486,6 +1497,7 @@
2928F8321CD09E320036D761 /* Toolview.m in Sources */,
2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */,
041636C21CF395B7008CE961 /* NSObject+UIImagePickerController.m in Sources */,
04F662141CFB700B00384248 /* SecenTableViewCell.m in Sources */,
044CD6F11CEB81350004A715 /* ProductCollectionPictureCell.m in Sources */,
29BFBD8F1CE44BA900C238FB /* goodsDetailsSectionview.m in Sources */,
29CCA43C1CF7ED6100BC19DD /* SelectedTableViewCell.m in Sources */,
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
......@@ -749,7 +749,7 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="firstcell" rowHeight="84" id="XgA-9w-ut9" customClass="OrderInformationTableViewCell">
<rect key="frame" x="0.0" y="114" width="1024" height="84"/>
<rect key="frame" x="0.0" y="50" width="1024" height="84"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XgA-9w-ut9" id="BWi-jv-OOH">
<rect key="frame" x="0.0" y="0.0" width="1024" height="83"/>
......@@ -822,7 +822,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="secondcell" rowHeight="110" id="rIO-yd-hh7" customClass="PersonInformationTableViewCell">
<rect key="frame" x="0.0" y="198" width="1024" height="110"/>
<rect key="frame" x="0.0" y="134" width="1024" height="110"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rIO-yd-hh7" id="mn8-g0-Zqo">
<rect key="frame" x="0.0" y="0.0" width="1024" height="109"/>
......@@ -899,7 +899,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="thirdcell" rowHeight="90" id="PfN-24-v5t" customClass="GoodsInformationTableViewCell">
<rect key="frame" x="0.0" y="308" width="1024" height="90"/>
<rect key="frame" x="0.0" y="244" width="1024" height="90"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PfN-24-v5t" id="2Je-94-WVY">
<rect key="frame" x="0.0" y="0.0" width="1024" height="89"/>
......@@ -956,7 +956,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fourthcell" rowHeight="80" id="47T-H0-tG7" customClass="CommodityListTableViewCell">
<rect key="frame" x="0.0" y="398" width="1024" height="80"/>
<rect key="frame" x="0.0" y="334" width="1024" height="80"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="47T-H0-tG7" id="zXR-bC-Wdh">
<rect key="frame" x="0.0" y="0.0" width="1024" height="79"/>
......@@ -1028,7 +1028,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="sixthcell" rowHeight="50" id="PNT-Fy-4Hi" customClass="AllpriceTableViewCell">
<rect key="frame" x="0.0" y="478" width="1024" height="50"/>
<rect key="frame" x="0.0" y="414" width="1024" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PNT-Fy-4Hi" id="PxE-0c-Zdt">
<rect key="frame" x="0.0" y="0.0" width="1024" height="49"/>
......@@ -1189,17 +1189,12 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<rect key="frame" x="0.0" y="64" width="300" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="ouS-bk-kdM">
<rect key="frame" x="0.0" y="0.0" width="300" height="214"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.98431372549019602" green="0.96862745098039216" blue="0.92941176470588238" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="名称" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KUt-Kl-mRA">
<rect key="frame" x="18" y="222" width="226" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
......@@ -1229,6 +1224,11 @@
<action selector="AddShoppingcarButtonClick:" destination="J5m-0M-uqb" eventType="touchUpInside" id="qsE-nO-ZHl"/>
</connections>
</button>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="05产品库-详情_03" id="ouS-bk-kdM">
<rect key="frame" x="0.0" y="0.0" width="300" height="214"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.98431372549019602" green="0.96862745098039216" blue="0.92941176470588238" alpha="1" colorSpace="calibratedRGB"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
......
......@@ -190,7 +190,7 @@
#define KROWS 10
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment