Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Opple-iOS
Commits
9e8538c5
Commit
9e8538c5
authored
May 05, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
6c952a8a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
752 additions
and
15 deletions
+752
-15
ProductDetailsHeaderView.h
Lighting/Class/ProductDetailsHeaderView.h
+104
-0
ProductDetailsHeaderView.m
Lighting/Class/ProductDetailsHeaderView.m
+40
-0
ProductDetailsHeaderView.xib
Lighting/Class/ProductDetailsHeaderView.xib
+192
-0
ProductDetailsTableViewCell.h
Lighting/Class/ProductDetailsTableViewCell.h
+13
-0
ProductDetailsTableViewCell.m
Lighting/Class/ProductDetailsTableViewCell.m
+24
-0
ProductDetailsViewController.h
Lighting/Class/ProductDetailsViewController.h
+11
-0
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+50
-2
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+13
-2
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+16
-0
Main.storyboard
Lighting/Lighting/Base.lproj/Main.storyboard
+1
-1
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+287
-10
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+1
-0
No files found.
Lighting/Class/ProductDetailsHeaderView.h
0 → 100644
View file @
9e8538c5
//
// 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
Lighting/Class/ProductDetailsHeaderView.m
0 → 100644
View file @
9e8538c5
//
// 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
Lighting/Class/ProductDetailsHeaderView.xib
0 → 100644
View file @
9e8538c5
This diff is collapsed.
Click to expand it.
Lighting/Class/ProductDetailsTableViewCell.h
0 → 100644
View file @
9e8538c5
//
// ProductDetailsTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/5/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
ProductDetailsTableViewCell
:
UITableViewCell
@end
Lighting/Class/ProductDetailsTableViewCell.m
0 → 100644
View file @
9e8538c5
//
// 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
Lighting/Class/ProductDetailsViewController.h
View file @
9e8538c5
...
...
@@ -10,4 +10,15 @@
@interface
ProductDetailsViewController
:
BaseViewController
/**
* 商品详情tableview
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
productDetilsTableview
;
@end
Lighting/Class/ProductDetailsViewController.m
View file @
9e8538c5
...
...
@@ -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.
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
9e8538c5
...
...
@@ -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
.
d
ataSourc
e
=
self
;
self
.
productCollectionView
.
d
elegat
e
=
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
];
}
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
9e8538c5
...
...
@@ -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 */
,
...
...
Lighting/Lighting/Base.lproj/Main.storyboard
View file @
9e8538c5
...
...
@@ -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"
flexibleM
inY=
"YES"
flexibleM
axY=
"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"
/>
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
9e8538c5
This diff is collapsed.
Click to expand it.
Lighting/Tools/PrefixHeader.pch
View file @
9e8538c5
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment