Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
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
cemarose
ios1x
Commits
985d1cf9
Commit
985d1cf9
authored
Aug 28, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
3a6a3a66
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
4 deletions
+71
-4
KWMNewHomeCell.m
iCemarose/Class/UI/NewHome/Cell/KWMNewHomeCell.m
+38
-0
KWMNewHomeCell.xib
iCemarose/Class/UI/NewHome/Cell/KWMNewHomeCell.xib
+31
-3
KWMRuleView.m
iCemarose/Class/View/KWMRuleView.m
+1
-0
Info.plist
iCemarose/Info.plist
+1
-1
No files found.
iCemarose/Class/UI/NewHome/Cell/KWMNewHomeCell.m
View file @
985d1cf9
...
@@ -13,10 +13,14 @@
...
@@ -13,10 +13,14 @@
#import "UIImageView+WebCache.h"
#import "UIImageView+WebCache.h"
#import "NSLayoutConstraint+Multiplier.h"
#import "NSLayoutConstraint+Multiplier.h"
#import "UIColor+SAMAdditions.h"
#import "UIColor+SAMAdditions.h"
#import "KWMRuleView.h"
@interface
KWMNewHomeCell
()
@interface
KWMNewHomeCell
()
@property
(
nonatomic
,
strong
)
KWMRuleView
*
ruleView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
ruleBtn
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbBrand
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbBrand
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbName
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbName
;
...
@@ -30,6 +34,8 @@
...
@@ -30,6 +34,8 @@
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
heightDetail
;
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
heightDetail
;
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
precentOfProductImageView
;
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
precentOfProductImageView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
closeRuleView
;
@end
@end
...
@@ -38,7 +44,35 @@
...
@@ -38,7 +44,35 @@
-
(
void
)
awakeFromNib
{
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
super
awakeFromNib
];
[
self
.
vContent
initDefaultShadow
];
[
self
.
vContent
initDefaultShadow
];
[
self
initRuleView
];
}
-
(
void
)
initRuleView
{
_ruleView
=
[[
KWMRuleView
alloc
]
initWithFrame
:
CGRectMake
((
UI_SCREEN_WIDTH
-
70
)
/
2
,
0
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
)];
[
_vImageContentView
addSubview
:
_ruleView
];
_vImageContentView
.
layer
.
masksToBounds
=
YES
;
}
-
(
IBAction
)
openRuleView
:
(
id
)
sender
{
if
(
_ruleView
.
frame
.
origin
.
x
)
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
_ruleView
.
frame
=
CGRectMake
(
0
,
0
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
);
self
.
closeRuleView
.
hidden
=
NO
;
self
.
ruleBtn
.
selected
=
YES
;
}];
}
}
}
-
(
IBAction
)
closeRuleView
:
(
id
)
sender
{
if
(
!
_ruleView
.
frame
.
origin
.
x
)
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
_ruleView
.
frame
=
CGRectMake
((
UI_SCREEN_WIDTH
-
70
)
/
2
,
0
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
);
self
.
closeRuleView
.
hidden
=
YES
;
self
.
ruleBtn
.
selected
=
NO
;
}];
}
}
-
(
void
)
setSingleShow
:
(
BOOL
)
singleShow
{
-
(
void
)
setSingleShow
:
(
BOOL
)
singleShow
{
if
(
singleShow
){
if
(
singleShow
){
...
@@ -56,6 +90,9 @@
...
@@ -56,6 +90,9 @@
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
_product
=
product
;
_product
=
product
;
_ruleView
.
frame
=
CGRectMake
((
UI_SCREEN_WIDTH
-
70
)
/
2
,
0
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
,
(
UI_SCREEN_WIDTH
-
70
)
/
2
);
self
.
closeRuleView
.
hidden
=
YES
;
self
.
ruleBtn
.
selected
=
NO
;
if
(
product
){
if
(
product
){
NSString
*
imageUrl
=
[
KWMImageUtil
getProductImageUrl
:
product
ImageSize
:
SmallImage
];
NSString
*
imageUrl
=
[
KWMImageUtil
getProductImageUrl
:
product
ImageSize
:
SmallImage
];
NSURL
*
imageURL
=
[
NSURL
URLWithString
:
imageUrl
];
NSURL
*
imageURL
=
[
NSURL
URLWithString
:
imageUrl
];
...
@@ -67,6 +104,7 @@
...
@@ -67,6 +104,7 @@
// self.lbPrice.text = [KWMStringUtil price:variant.price];
// self.lbPrice.text = [KWMStringUtil price:variant.price];
self
.
lbPrice
.
text
=
variant
.
price
.
priceValueFormatted
;
self
.
lbPrice
.
text
=
variant
.
price
.
priceValueFormatted
;
}
}
[
self
.
ruleView
setData
:
product
];
}
}
}
}
...
...
iCemarose/Class/UI/NewHome/Cell/KWMNewHomeCell.xib
View file @
985d1cf9
...
@@ -64,30 +64,55 @@
...
@@ -64,30 +64,55 @@
<color
key=
"textColor"
red=
"0.94509803921568625"
green=
"0.5725490196078431"
blue=
"0.60392156862745094"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.94509803921568625"
green=
"0.5725490196078431"
blue=
"0.60392156862745094"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"qmx-0m-1kL"
>
<rect
key=
"frame"
x=
"134"
y=
"31"
width=
"30"
height=
"27"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"26.699999999999999"
id=
"dDr-q4-lce"
/>
<constraint
firstAttribute=
"width"
constant=
"30"
id=
"o9E-xW-72O"
/>
</constraints>
<state
key=
"normal"
image=
"bttn-size-nor"
/>
<state
key=
"selected"
image=
"bttn-size-sel"
/>
<connections>
<action
selector=
"openRuleView:"
destination=
"gTV-IL-0wX"
eventType=
"touchUpInside"
id=
"Mce-a4-4fb"
/>
</connections>
</button>
</subviews>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraints>
<constraint
firstItem=
"VtC-9N-HwV"
firstAttribute=
"top"
secondItem=
"iip-8b-kmO"
secondAttribute=
"bottom"
id=
"16X-5N-xSs"
/>
<constraint
firstItem=
"VtC-9N-HwV"
firstAttribute=
"top"
secondItem=
"iip-8b-kmO"
secondAttribute=
"bottom"
id=
"16X-5N-xSs"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"I9K-1A-41L"
secondAttribute=
"trailing"
constant=
"20"
id=
"1kb-sg-Uqg"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"I9K-1A-41L"
secondAttribute=
"trailing"
constant=
"20"
id=
"1kb-sg-Uqg"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"VtC-9N-HwV"
secondAttribute=
"trailing"
constant=
"20"
id=
"389-Pn-ig8"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"VtC-9N-HwV"
secondAttribute=
"trailing"
constant=
"20"
id=
"389-Pn-ig8"
/>
<constraint
firstAttribute=
"
height"
constant=
"58"
id=
"BxL-cT-uAn
"
/>
<constraint
firstAttribute=
"
bottom"
secondItem=
"I9K-1A-41L"
secondAttribute=
"bottom"
constant=
"1.5"
id=
"GaX-IC-R9e
"
/>
<constraint
firstItem=
"VtC-9N-HwV"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"QtM-Cr-AXV"
/>
<constraint
firstItem=
"VtC-9N-HwV"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"QtM-Cr-AXV"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"qmx-0m-1kL"
secondAttribute=
"trailing"
id=
"Wu9-bG-WUm"
/>
<constraint
firstItem=
"iip-8b-kmO"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"Zcb-lU-p9m"
/>
<constraint
firstItem=
"iip-8b-kmO"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"Zcb-lU-p9m"
/>
<constraint
firstItem=
"I9K-1A-41L"
firstAttribute=
"top"
secondItem=
"VtC-9N-HwV"
secondAttribute=
"bottom"
constant=
"3"
id=
"bme-8F-ZDe"
/>
<constraint
firstItem=
"I9K-1A-41L"
firstAttribute=
"top"
secondItem=
"VtC-9N-HwV"
secondAttribute=
"bottom"
constant=
"3"
id=
"bme-8F-ZDe"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iip-8b-kmO"
secondAttribute=
"trailing"
constant=
"20"
id=
"jdj-gd-LB1"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iip-8b-kmO"
secondAttribute=
"trailing"
constant=
"20"
id=
"jdj-gd-LB1"
/>
<constraint
firstItem=
"iip-8b-kmO"
firstAttribute=
"top"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"top"
constant=
"8"
id=
"m4m-OE-wOy"
/>
<constraint
firstItem=
"iip-8b-kmO"
firstAttribute=
"top"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"top"
constant=
"8"
id=
"m4m-OE-wOy"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"qmx-0m-1kL"
secondAttribute=
"bottom"
id=
"nRI-tm-1FG"
/>
<constraint
firstItem=
"I9K-1A-41L"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"tYc-3m-qFv"
/>
<constraint
firstItem=
"I9K-1A-41L"
firstAttribute=
"leading"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"leading"
constant=
"20"
id=
"tYc-3m-qFv"
/>
</constraints>
</constraints>
</view>
</view>
<button
hidden=
"YES"
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jVa-th-3NP"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"164"
height=
"222"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<connections>
<action
selector=
"closeRuleView:"
destination=
"gTV-IL-0wX"
eventType=
"touchUpInside"
id=
"Zhr-kD-lMN"
/>
</connections>
</button>
</subviews>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"trailing"
id=
"4w1-Kx-WSk"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"xUT-R0-mXN"
secondAttribute=
"trailing"
id=
"4w1-Kx-WSk"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"jVa-th-3NP"
secondAttribute=
"bottom"
id=
"C89-db-cpX"
/>
<constraint
firstItem=
"xUT-R0-mXN"
firstAttribute=
"top"
secondItem=
"BhP-MK-bac"
secondAttribute=
"bottom"
id=
"Evl-ay-GtA"
/>
<constraint
firstItem=
"xUT-R0-mXN"
firstAttribute=
"top"
secondItem=
"BhP-MK-bac"
secondAttribute=
"bottom"
id=
"Evl-ay-GtA"
/>
<constraint
firstItem=
"BhP-MK-bac"
firstAttribute=
"leading"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"leading"
id=
"F6l-tu-wMy"
/>
<constraint
firstItem=
"BhP-MK-bac"
firstAttribute=
"leading"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"leading"
id=
"F6l-tu-wMy"
/>
<constraint
firstItem=
"xUT-R0-mXN"
firstAttribute=
"leading"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"leading"
id=
"PeQ-54-zbR"
/>
<constraint
firstItem=
"xUT-R0-mXN"
firstAttribute=
"leading"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"leading"
id=
"PeQ-54-zbR"
/>
<constraint
firstItem=
"jVa-th-3NP"
firstAttribute=
"leading"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"leading"
id=
"fUy-jR-YLB"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"BhP-MK-bac"
secondAttribute=
"trailing"
id=
"g9u-PT-Ftv"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"BhP-MK-bac"
secondAttribute=
"trailing"
id=
"g9u-PT-Ftv"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"jVa-th-3NP"
secondAttribute=
"trailing"
id=
"kNy-Tt-mIz"
/>
<constraint
firstItem=
"BhP-MK-bac"
firstAttribute=
"top"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"top"
id=
"mIF-cb-27W"
/>
<constraint
firstItem=
"BhP-MK-bac"
firstAttribute=
"top"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"top"
id=
"mIF-cb-27W"
/>
<constraint
firstItem=
"jVa-th-3NP"
firstAttribute=
"top"
secondItem=
"PUL-8B-4lT"
secondAttribute=
"top"
id=
"n24-do-48o"
/>
</constraints>
</constraints>
</view>
</view>
</subviews>
</subviews>
...
@@ -109,19 +134,22 @@
...
@@ -109,19 +134,22 @@
</constraints>
</constraints>
<size
key=
"customSize"
width=
"145"
height=
"199"
/>
<size
key=
"customSize"
width=
"145"
height=
"199"
/>
<connections>
<connections>
<outlet
property=
"
heightDetail"
destination=
"BxL-cT-uAn"
id=
"n1u-UY-1fG
"
/>
<outlet
property=
"
closeRuleView"
destination=
"jVa-th-3NP"
id=
"gV4-8f-guo
"
/>
<outlet
property=
"ivProduct"
destination=
"Yw1-oo-Px9"
id=
"3Rn-XP-ted"
/>
<outlet
property=
"ivProduct"
destination=
"Yw1-oo-Px9"
id=
"3Rn-XP-ted"
/>
<outlet
property=
"lbBrand"
destination=
"iip-8b-kmO"
id=
"kWY-VC-0aX"
/>
<outlet
property=
"lbBrand"
destination=
"iip-8b-kmO"
id=
"kWY-VC-0aX"
/>
<outlet
property=
"lbName"
destination=
"VtC-9N-HwV"
id=
"fk8-4v-a3w"
/>
<outlet
property=
"lbName"
destination=
"VtC-9N-HwV"
id=
"fk8-4v-a3w"
/>
<outlet
property=
"lbPrice"
destination=
"I9K-1A-41L"
id=
"AIn-iA-Kep"
/>
<outlet
property=
"lbPrice"
destination=
"I9K-1A-41L"
id=
"AIn-iA-Kep"
/>
<outlet
property=
"precentOfProductImageView"
destination=
"dkf-r1-dTB"
id=
"dRj-Y3-XxE"
/>
<outlet
property=
"precentOfProductImageView"
destination=
"dkf-r1-dTB"
id=
"dRj-Y3-XxE"
/>
<outlet
property=
"ruleBtn"
destination=
"qmx-0m-1kL"
id=
"0qI-w9-cJR"
/>
<outlet
property=
"vContent"
destination=
"PUL-8B-4lT"
id=
"HaA-xv-gdY"
/>
<outlet
property=
"vContent"
destination=
"PUL-8B-4lT"
id=
"HaA-xv-gdY"
/>
<outlet
property=
"vImageContentView"
destination=
"BhP-MK-bac"
id=
"sIb-MH-85v"
/>
<outlet
property=
"vImageContentView"
destination=
"BhP-MK-bac"
id=
"sIb-MH-85v"
/>
</connections>
</connections>
<point
key=
"canvasLocation"
x=
"81
.5"
y=
"182.5
"
/>
<point
key=
"canvasLocation"
x=
"81
"
y=
"182
"
/>
</collectionViewCell>
</collectionViewCell>
</objects>
</objects>
<resources>
<resources>
<image
name=
"bttn-size-nor"
width=
"6"
height=
"14"
/>
<image
name=
"bttn-size-sel"
width=
"6"
height=
"14"
/>
<image
name=
"test_home_cloth_2"
width=
"140"
height=
"140"
/>
<image
name=
"test_home_cloth_2"
width=
"140"
height=
"140"
/>
</resources>
</resources>
</document>
</document>
iCemarose/Class/View/KWMRuleView.m
View file @
985d1cf9
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
self
.
lbHeader
.
tag
=
10086
;
self
.
lbHeader
.
tag
=
10086
;
}
}
static
CGFloat
height
=
13
;
static
CGFloat
height
=
13
;
static
CGFloat
width
=
50
;
static
CGFloat
width
=
50
;
static
CGFloat
spaceTop
=
14
;
//顶部lb高度
static
CGFloat
spaceTop
=
14
;
//顶部lb高度
...
...
iCemarose/Info.plist
View file @
985d1cf9
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
201708082
1
<
/string
>
<
string
>
201708082
3
<
/string
>
<
k
e
y
>
ITSAppUsesNonExemptEncryption
<
/k
e
y
>
<
k
e
y
>
ITSAppUsesNonExemptEncryption
<
/k
e
y
>
<
fa
ls
e
/
>
<
fa
ls
e
/
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
...
...
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