Commit 9e8538c5 authored by 曹云霄's avatar 曹云霄

caoyunxiao

parent 6c952a8a
//
// ProductDetailsHeaderView.h
// Lighting
//
// Created by 曹云霄 on 16/5/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ProductDetailsHeaderView : UIView
/**
* 添加至购物袋
*/
@property (weak, nonatomic) IBOutlet UIButton *addGoodsShoppingbagsButton;
/**
* 库存标题(添加至购物车按钮需要适配)
*/
@property (weak, nonatomic) IBOutlet UILabel *inventoryLabe;
/**
* 库存数量
*/
@property (weak, nonatomic) IBOutlet UILabel *inventoryNumber;
/**
* 商品数量
*/
@property (weak, nonatomic) IBOutlet UITextField *goodsNumber;
/**
* 减少商品
*/
@property (weak, nonatomic) IBOutlet UIButton *reduceButton;
/**
* 增加商品
*/
@property (weak, nonatomic) IBOutlet UIButton *addButton;
/**
* 吊牌价格
*/
@property (weak, nonatomic) IBOutlet UILabel *dorpPriceLabe;
/**
* 品牌名称
*/
@property (weak, nonatomic) IBOutlet UILabel *brandName;
/**
* 名称
*/
@property (weak, nonatomic) IBOutlet UILabel *nameLabe;
/**
* 编号
*/
@property (weak, nonatomic) IBOutlet UILabel *serialNumber;
/**
* 向上滑动scrollview
*/
@property (weak, nonatomic) IBOutlet UIButton *topSlidingScrollView;
/**
* 向下滑动scrollview
*/
@property (weak, nonatomic) IBOutlet UIButton *downSlidingScrollView;
/**
* 商品同型号,其他规格scrollview
*/
@property (weak, nonatomic) IBOutlet UIScrollView *goodsBrotherScrollview;
/**
* 商品大图
*/
@property (weak, nonatomic) IBOutlet UIImageView *goodsImageview;
/**
* 放大按钮
*/
@property (weak, nonatomic) IBOutlet UIButton *amplificationButton;
@end
//
// ProductDetailsHeaderView.m
// Lighting
//
// Created by 曹云霄 on 16/5/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ProductDetailsHeaderView.h"
@implementation ProductDetailsHeaderView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
#pragma mark -UI
- (void)uiConfigAction
{
[self.addGoodsShoppingbagsButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.inventoryLabe);
make.top.equalTo(self.inventoryLabe).offset(40);
make.width.mas_equalTo(200);
}];
}
#pragma mark -初始化Nib文件
- (void)awakeFromNib
{
[self uiConfigAction];
}
@end
This diff is collapsed.
//
// ProductDetailsTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/5/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ProductDetailsTableViewCell : UITableViewCell
@end
//
// ProductDetailsTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 16/5/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ProductDetailsTableViewCell.h"
@implementation ProductDetailsTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -10,4 +10,15 @@
@interface ProductDetailsViewController : BaseViewController
/**
* 商品详情tableview
*/
@property (weak, nonatomic) IBOutlet UITableView *productDetilsTableview;
@end
......@@ -7,8 +7,13 @@
//
#import "ProductDetailsViewController.h"
#import "ProductDetailsTableViewCell.h"
#import "ProductDetailsHeaderView.h"
@interface ProductDetailsViewController ()
@interface ProductDetailsViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong) ProductDetailsHeaderView *headerView;
@end
......@@ -16,9 +21,52 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self uiConfigAction];
}
#pragma mark -UI
- (void)uiConfigAction
{
self.productDetilsTableview.dataSource = self;
self.productDetilsTableview.delegate = self;
[self CreateHeaderView];
}
#pragma mark -头部视图
- (void)CreateHeaderView
{
self.headerView = [[[NSBundle mainBundle] loadNibNamed:@"ProductDetailsHeaderView" owner:self options:nil] lastObject];
self.productDetilsTableview.tableHeaderView = self.headerView;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ProductDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"productDetailscell" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 2;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 170;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -8,6 +8,11 @@
#import "ProductLibraryViewController.h"
#import "ProductCollectionViewCell.h"
#import "ProductDetailsViewController.h"
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
......@@ -32,7 +37,7 @@
self.productCollectionLayout.minimumLineSpacing = 20;
self.productCollectionLayout.minimumInteritemSpacing = 20;
self.productCollectionView.dataSource = self;
self.productCollectionView.dataSource = self;
self.productCollectionView.delegate = self;
[self CreatescreeningButton];
}
......@@ -78,7 +83,13 @@
return 20;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil];
ProductDetailsViewController *productDetails = [storyboard instantiateViewControllerWithIdentifier:@"productdetails"];
[self.navigationController pushViewController:productDetails animated:YES];
}
......
......@@ -42,6 +42,9 @@
2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2998763E1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m */; };
299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 299876411CD99E4000C90D0A /* OrderdetailsViewController.m */; };
29A8D3981CD85A58004D558F /* ClientdetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A8D3971CD85A58004D558F /* ClientdetailsViewController.m */; };
29A938221CDADE4700F21E54 /* ProductDetailsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A938211CDADE4700F21E54 /* ProductDetailsTableViewCell.m */; };
29A938251CDAE31200F21E54 /* ProductDetailsHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A938241CDAE31200F21E54 /* ProductDetailsHeaderView.m */; };
29A938271CDAE31B00F21E54 /* ProductDetailsHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29A938261CDAE31B00F21E54 /* ProductDetailsHeaderView.xib */; };
29BB27681CD9D38E009A0813 /* AllpriceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB27671CD9D38E009A0813 /* AllpriceTableViewCell.m */; };
29BB276C1CD9DE74009A0813 /* FollowHeartViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB276B1CD9DE74009A0813 /* FollowHeartViewController.m */; };
29BB27741CD9DFAC009A0813 /* SceneLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB27731CD9DFAC009A0813 /* SceneLibraryViewController.m */; };
......@@ -118,6 +121,11 @@
299876411CD99E4000C90D0A /* OrderdetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderdetailsViewController.m; sourceTree = "<group>"; };
29A8D3961CD85A58004D558F /* ClientdetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientdetailsViewController.h; sourceTree = "<group>"; };
29A8D3971CD85A58004D558F /* ClientdetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientdetailsViewController.m; sourceTree = "<group>"; };
29A938201CDADE4700F21E54 /* ProductDetailsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsTableViewCell.h; sourceTree = "<group>"; };
29A938211CDADE4700F21E54 /* ProductDetailsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductDetailsTableViewCell.m; sourceTree = "<group>"; };
29A938231CDAE31200F21E54 /* ProductDetailsHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsHeaderView.h; sourceTree = "<group>"; };
29A938241CDAE31200F21E54 /* ProductDetailsHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductDetailsHeaderView.m; sourceTree = "<group>"; };
29A938261CDAE31B00F21E54 /* ProductDetailsHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ProductDetailsHeaderView.xib; sourceTree = "<group>"; };
29BB27661CD9D38E009A0813 /* AllpriceTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllpriceTableViewCell.h; sourceTree = "<group>"; };
29BB27671CD9D38E009A0813 /* AllpriceTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AllpriceTableViewCell.m; sourceTree = "<group>"; };
29BB276A1CD9DE74009A0813 /* FollowHeartViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FollowHeartViewController.h; sourceTree = "<group>"; };
......@@ -555,6 +563,11 @@
children = (
29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */,
29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */,
29A938201CDADE4700F21E54 /* ProductDetailsTableViewCell.h */,
29A938211CDADE4700F21E54 /* ProductDetailsTableViewCell.m */,
29A938231CDAE31200F21E54 /* ProductDetailsHeaderView.h */,
29A938241CDAE31200F21E54 /* ProductDetailsHeaderView.m */,
29A938261CDAE31B00F21E54 /* ProductDetailsHeaderView.xib */,
);
name = view;
sourceTree = "<group>";
......@@ -637,6 +650,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
29A938271CDAE31B00F21E54 /* ProductDetailsHeaderView.xib in Resources */,
29807C651CD20F0F00F111B8 /* StoryboardwithCYX.storyboard in Resources */,
29706DB71CD082990003C412 /* LaunchScreen.storyboard in Resources */,
29807C621CD20C2A00F111B8 /* Images.xcassets in Resources */,
......@@ -707,6 +721,7 @@
2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */,
293393551CD3379E000D997B /* ShoppingTableViewCell.m in Sources */,
2949BAC21CD3055A0049385A /* MMExampleDrawerVisualStateManager.m in Sources */,
29A938221CDADE4700F21E54 /* ProductDetailsTableViewCell.m in Sources */,
29BB27741CD9DFAC009A0813 /* SceneLibraryViewController.m in Sources */,
2928F8421CD0ABAC0036D761 /* ShoppingViewController.m in Sources */,
299876331CD997DF00C90D0A /* OrderInformationTableViewCell.m in Sources */,
......@@ -723,6 +738,7 @@
2962D0711CD1A58B0058829D /* RightViewController.m in Sources */,
29706DA91CD082990003C412 /* AppDelegate.m in Sources */,
29706DA61CD082990003C412 /* main.m in Sources */,
29A938251CDAE31200F21E54 /* ProductDetailsHeaderView.m in Sources */,
299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */,
2962D07D1CD1E4490058829D /* NSArray+Objectwithindex.m in Sources */,
299876391CD9981800C90D0A /* GoodsInformationTableViewCell.m in Sources */,
......
......@@ -18,7 +18,7 @@
</imageView>
<view contentMode="scaleToFill" id="4F7-r1-Ukj">
<rect key="frame" x="79" y="228" width="350" height="311"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="tiS-xO-6mX">
<rect key="frame" x="0.0" y="0.0" width="350" height="49"/>
......
......@@ -18,6 +18,7 @@
#import "NSArray+Objectwithindex.h"
#import "ShoppingViewController.h"
#import "ClientViewController.h"
#import "Masonry.h"
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
......
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