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
d148bf5c
Commit
d148bf5c
authored
Sep 15, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product update UI, add brand description
parent
4cfedd42
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
431 additions
and
85 deletions
+431
-85
project.pbxproj
iCemarose.xcodeproj/project.pbxproj
+10
-0
1024x1024bb.jpg
iCemarose/Assets.xcassets/AppIcon.appiconset/1024x1024bb.jpg
+0
-0
Contents.json
iCemarose/Assets.xcassets/AppIcon.appiconset/Contents.json
+6
-0
LaunchScreen.storyboard
iCemarose/Base.lproj/LaunchScreen.storyboard
+3
-3
KWMContactUsVC.m
iCemarose/Class/UI/Mine/KWMContactUsVC.m
+1
-1
Mine.storyboard
iCemarose/Class/UI/Mine/Mine.storyboard
+3
-3
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+1
-0
KWMMidDetailView.h
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.h
+9
-0
KWMMidDetailView.m
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.m
+69
-10
KWMSecondDetailView.h
iCemarose/Class/UI/NewProduct/Cell/KWMSecondDetailView.h
+6
-0
KWMSecondDetailView.m
iCemarose/Class/UI/NewProduct/Cell/KWMSecondDetailView.m
+16
-12
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+46
-22
NewProduct.storyboard
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
+12
-5
KWMCollectionCell.h
iCemarose/Class/UI/Product/Cell/KWMCollectionCell.h
+2
-0
KWMCollectionCell.m
iCemarose/Class/UI/Product/Cell/KWMCollectionCell.m
+44
-0
KWMBeforePayVC.m
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
+6
-5
KWMImageUtil.m
iCemarose/Class/Util/KWMImageUtil.m
+15
-10
KWMProductSameBrandView.h
iCemarose/Class/View/KWMProductSameBrandView.h
+16
-0
KWMProductSameBrandView.m
iCemarose/Class/View/KWMProductSameBrandView.m
+21
-0
KWMProductSameBrandView.xib
iCemarose/Class/View/KWMProductSameBrandView.xib
+130
-0
KWMTBVSectionHeardView.h
iCemarose/Class/View/KWMTBVSectionHeardView.h
+2
-0
KWMTBVSectionHeardView.m
iCemarose/Class/View/KWMTBVSectionHeardView.m
+4
-0
KWMTBVSectionHeardView.xib
iCemarose/Class/View/KWMTBVSectionHeardView.xib
+7
-12
Info.plist
iCemarose/Info.plist
+2
-2
No files found.
iCemarose.xcodeproj/project.pbxproj
View file @
d148bf5c
...
@@ -350,6 +350,8 @@
...
@@ -350,6 +350,8 @@
DA4E36981F17729C0007E4D0
/* KWMCategoryModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E36971F17729C0007E4D0
/* KWMCategoryModel.m */
;
};
DA4E36981F17729C0007E4D0
/* KWMCategoryModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E36971F17729C0007E4D0
/* KWMCategoryModel.m */
;
};
DA4E369E1F188B400007E4D0
/* BUYClient+FilterSoldout.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E369D1F188B400007E4D0
/* BUYClient+FilterSoldout.m */
;
};
DA4E369E1F188B400007E4D0
/* BUYClient+FilterSoldout.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E369D1F188B400007E4D0
/* BUYClient+FilterSoldout.m */
;
};
DA4E36A11F18A6CB0007E4D0
/* KWMPageResult.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E36A01F18A6CB0007E4D0
/* KWMPageResult.m */
;
};
DA4E36A11F18A6CB0007E4D0
/* KWMPageResult.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA4E36A01F18A6CB0007E4D0
/* KWMPageResult.m */
;
};
DA7457681F692D67000E192E
/* KWMProductSameBrandView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA7457671F692D67000E192E
/* KWMProductSameBrandView.m */
;
};
DA74576C1F692DCA000E192E
/* KWMProductSameBrandView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA74576B1F692DCA000E192E
/* KWMProductSameBrandView.xib */
;
};
DA7DF8E51F1DB01600D5239B
/* NSString+Format.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA7DF8E41F1DB01600D5239B
/* NSString+Format.m */
;
};
DA7DF8E51F1DB01600D5239B
/* NSString+Format.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA7DF8E41F1DB01600D5239B
/* NSString+Format.m */
;
};
DA8B97801F58F816002FC38A
/* SDImageCache+Resize.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA8B977F1F58F816002FC38A
/* SDImageCache+Resize.m */
;
};
DA8B97801F58F816002FC38A
/* SDImageCache+Resize.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA8B977F1F58F816002FC38A
/* SDImageCache+Resize.m */
;
};
DA8D64121F31C67F00B8F4A6
/* DeepLinkURLProtocol.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA8D64111F31C67F00B8F4A6
/* DeepLinkURLProtocol.m */
;
};
DA8D64121F31C67F00B8F4A6
/* DeepLinkURLProtocol.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
DA8D64111F31C67F00B8F4A6
/* DeepLinkURLProtocol.m */
;
};
...
@@ -978,6 +980,9 @@
...
@@ -978,6 +980,9 @@
DA4E369D1F188B400007E4D0
/* BUYClient+FilterSoldout.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+FilterSoldout.m"
;
sourceTree
=
"<group>"
;
};
DA4E369D1F188B400007E4D0
/* BUYClient+FilterSoldout.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+FilterSoldout.m"
;
sourceTree
=
"<group>"
;
};
DA4E369F1F18A6CB0007E4D0
/* KWMPageResult.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMPageResult.h
;
sourceTree
=
"<group>"
;
};
DA4E369F1F18A6CB0007E4D0
/* KWMPageResult.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMPageResult.h
;
sourceTree
=
"<group>"
;
};
DA4E36A01F18A6CB0007E4D0
/* KWMPageResult.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
KWMPageResult.m
;
sourceTree
=
"<group>"
;
};
DA4E36A01F18A6CB0007E4D0
/* KWMPageResult.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
KWMPageResult.m
;
sourceTree
=
"<group>"
;
};
DA7457661F692D67000E192E
/* KWMProductSameBrandView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMProductSameBrandView.h
;
sourceTree
=
"<group>"
;
};
DA7457671F692D67000E192E
/* KWMProductSameBrandView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
KWMProductSameBrandView.m
;
sourceTree
=
"<group>"
;
};
DA74576B1F692DCA000E192E
/* KWMProductSameBrandView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
KWMProductSameBrandView.xib
;
sourceTree
=
"<group>"
;
};
DA7DF8E31F1DB01600D5239B
/* NSString+Format.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"NSString+Format.h"
;
sourceTree
=
"<group>"
;
};
DA7DF8E31F1DB01600D5239B
/* NSString+Format.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"NSString+Format.h"
;
sourceTree
=
"<group>"
;
};
DA7DF8E41F1DB01600D5239B
/* NSString+Format.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSString+Format.m"
;
sourceTree
=
"<group>"
;
};
DA7DF8E41F1DB01600D5239B
/* NSString+Format.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSString+Format.m"
;
sourceTree
=
"<group>"
;
};
DA8B977E1F58F816002FC38A
/* SDImageCache+Resize.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"SDImageCache+Resize.h"
;
sourceTree
=
"<group>"
;
};
DA8B977E1F58F816002FC38A
/* SDImageCache+Resize.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"SDImageCache+Resize.h"
;
sourceTree
=
"<group>"
;
};
...
@@ -1515,6 +1520,9 @@
...
@@ -1515,6 +1520,9 @@
80C8014D1D78134800002306
/* KWMTBVSectionHeardView.h */
,
80C8014D1D78134800002306
/* KWMTBVSectionHeardView.h */
,
80C8014E1D78134800002306
/* KWMTBVSectionHeardView.m */
,
80C8014E1D78134800002306
/* KWMTBVSectionHeardView.m */
,
80C801501D78136400002306
/* KWMTBVSectionHeardView.xib */
,
80C801501D78136400002306
/* KWMTBVSectionHeardView.xib */
,
DA7457661F692D67000E192E
/* KWMProductSameBrandView.h */
,
DA7457671F692D67000E192E
/* KWMProductSameBrandView.m */
,
DA74576B1F692DCA000E192E
/* KWMProductSameBrandView.xib */
,
80E844251D7FB0FF0042AED2
/* KWMRuleView.h */
,
80E844251D7FB0FF0042AED2
/* KWMRuleView.h */
,
80E844261D7FB0FF0042AED2
/* KWMRuleView.m */
,
80E844261D7FB0FF0042AED2
/* KWMRuleView.m */
,
80E844281D7FB1130042AED2
/* KWMRuleView.xib */
,
80E844281D7FB1130042AED2
/* KWMRuleView.xib */
,
...
@@ -2420,6 +2428,7 @@
...
@@ -2420,6 +2428,7 @@
8077F79B1D73E39000A2E2E2
/* KWMBrandCaramelCell.xib in Resources */
,
8077F79B1D73E39000A2E2E2
/* KWMBrandCaramelCell.xib in Resources */
,
C034E6EB1D6AF0A0006EE129
/* Localizable.strings in Resources */
,
C034E6EB1D6AF0A0006EE129
/* Localizable.strings in Resources */
,
C0243BC91EFBD6060013CFA7
/* KWMCategoryFilterTab.xib in Resources */
,
C0243BC91EFBD6060013CFA7
/* KWMCategoryFilterTab.xib in Resources */
,
DA74576C1F692DCA000E192E
/* KWMProductSameBrandView.xib in Resources */
,
C0F586AE1E279574001248E2
/* KWMBottomView.xib in Resources */
,
C0F586AE1E279574001248E2
/* KWMBottomView.xib in Resources */
,
C0392DBA1DCC38450051AC8E
/* KWMShippingCell.xib in Resources */
,
C0392DBA1DCC38450051AC8E
/* KWMShippingCell.xib in Resources */
,
C0CCB3D01EEA765B00BC2FB8
/* KWMFilterTabItem.xib in Resources */
,
C0CCB3D01EEA765B00BC2FB8
/* KWMFilterTabItem.xib in Resources */
,
...
@@ -2752,6 +2761,7 @@
...
@@ -2752,6 +2761,7 @@
807AF4A41DC984950000A326
/* KWMBrandsResult.m in Sources */
,
807AF4A41DC984950000A326
/* KWMBrandsResult.m in Sources */
,
C048342B1F1324B400A5BFB4
/* KWMAdHeader.m in Sources */
,
C048342B1F1324B400A5BFB4
/* KWMAdHeader.m in Sources */
,
C034E8471D6B10A0006EE129
/* UIColor+Extend.m in Sources */
,
C034E8471D6B10A0006EE129
/* UIColor+Extend.m in Sources */
,
DA7457681F692D67000E192E
/* KWMProductSameBrandView.m in Sources */
,
C0DD53351EE55190002D1E0C
/* ArcToCircleLayer.m in Sources */
,
C0DD53351EE55190002D1E0C
/* ArcToCircleLayer.m in Sources */
,
C091EE361DDEEA9400A382B9
/* KWMVariants.m in Sources */
,
C091EE361DDEEA9400A382B9
/* KWMVariants.m in Sources */
,
C0E8AE121D7D52B200C193DC
/* KWMPayTypeVC.m in Sources */
,
C0E8AE121D7D52B200C193DC
/* KWMPayTypeVC.m in Sources */
,
...
...
iCemarose/Assets.xcassets/AppIcon.appiconset/1024x1024bb.jpg
0 → 100644
View file @
d148bf5c
48.5 KB
iCemarose/Assets.xcassets/AppIcon.appiconset/Contents.json
View file @
d148bf5c
...
@@ -101,6 +101,12 @@
...
@@ -101,6 +101,12 @@
"idiom"
:
"ipad"
,
"idiom"
:
"ipad"
,
"filename"
:
"appicon-16.png"
,
"filename"
:
"appicon-16.png"
,
"scale"
:
"2x"
"scale"
:
"2x"
},
{
"size"
:
"1024x1024"
,
"idiom"
:
"ios-marketing"
,
"filename"
:
"1024x1024bb.jpg"
,
"scale"
:
"1x"
}
}
],
],
"info"
:
{
"info"
:
{
...
...
iCemarose/Base.lproj/LaunchScreen.storyboard
View file @
d148bf5c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
2120"
systemVersion=
"16F73
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
3196
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
2088
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3173
"
/>
<capability
name=
"Constraints with non-1.0 multipliers"
minToolsVersion=
"5.1"
/>
<capability
name=
"Constraints with non-1.0 multipliers"
minToolsVersion=
"5.1"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<constraint
firstAttribute=
"height"
constant=
"24"
id=
"x1H-Jw-5lD"
/>
<constraint
firstAttribute=
"height"
constant=
"24"
id=
"x1H-Jw-5lD"
/>
</constraints>
</constraints>
</imageView>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"v 1.5.
6
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ytF-B2-drm"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"v 1.5.
7
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ytF-B2-drm"
>
<rect
key=
"frame"
x=
"168"
y=
"631"
width=
"39"
height=
"16"
/>
<rect
key=
"frame"
x=
"168"
y=
"631"
width=
"39"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
iCemarose/Class/UI/Mine/KWMContactUsVC.m
View file @
d148bf5c
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
-
(
IBAction
)
wechatAction
:
(
id
)
sender
{
-
(
IBAction
)
wechatAction
:
(
id
)
sender
{
[
self
showToast
:
@"复制成功"
];
[
self
showToast
:
@"复制成功"
];
UIPasteboard
*
pb
=
[
UIPasteboard
generalPasteboard
];
UIPasteboard
*
pb
=
[
UIPasteboard
generalPasteboard
];
pb
.
string
=
@"cemarose
1
"
;
pb
.
string
=
@"cemarose"
;
}
}
-
(
IBAction
)
weiboAction
:
(
id
)
sender
{
-
(
IBAction
)
weiboAction
:
(
id
)
sender
{
...
...
iCemarose/Class/UI/Mine/Mine.storyboard
View file @
d148bf5c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"12120"
systemVersion=
"16
F73
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"12120"
systemVersion=
"16
G29
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
...
@@ -329,8 +329,8 @@
...
@@ -329,8 +329,8 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nFz-xe-Hyc"
userLabel=
"v电话"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nFz-xe-Hyc"
userLabel=
"v电话"
>
<rect
key=
"frame"
x=
"0.0"
y=
"72"
width=
"375"
height=
"38"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"72"
width=
"375"
height=
"38"
/>
<subviews>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"cemarose
1
"
textAlignment=
"natural"
lineBreakMode=
"characterWrap"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"elR-WQ-QQC"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"cemarose"
textAlignment=
"natural"
lineBreakMode=
"characterWrap"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"elR-WQ-QQC"
>
<rect
key=
"frame"
x=
"30"
y=
"10.5"
width=
"5
9
.5"
height=
"17"
/>
<rect
key=
"frame"
x=
"30"
y=
"10.5"
width=
"5
4
.5"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"12"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"12"
/>
<color
key=
"textColor"
red=
"0.22352941179999999"
green=
"0.22352941179999999"
blue=
"0.22352941179999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
key=
"textColor"
red=
"0.22352941179999999"
green=
"0.22352941179999999"
blue=
"0.22352941179999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
d148bf5c
...
@@ -209,6 +209,7 @@ typedef enum{
...
@@ -209,6 +209,7 @@ typedef enum{
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
{
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
{
// NSLog(@"product");
// NSLog(@"product");
[
self
openURLWithString
:[
NSString
stringWithFormat
:
@"https://cemarose.myshopify.com/products/%@"
,
product
.
handle
]];
[
self
openURLWithString
:[
NSString
stringWithFormat
:
@"https://cemarose.myshopify.com/products/%@"
,
product
.
handle
]];
// [self openURLWithString:[NSString stringWithFormat:@"https://cemarose.myshopify.com/products/19247-01"]];
}
}
#pragma mark - UICollectionViewDataSource
#pragma mark - UICollectionViewDataSource
...
...
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.h
View file @
d148bf5c
...
@@ -9,9 +9,18 @@
...
@@ -9,9 +9,18 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import <Buy/Buy.h>
#import <Buy/Buy.h>
@protocol
KWMMidDetailViewDelegate
<
NSObject
>
-
(
void
)
kwm_updatedHeight
:
(
CGFloat
)
height
;
@end
@interface
KWMMidDetailView
:
UIView
@interface
KWMMidDetailView
:
UIView
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vView
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vView
;
@property
(
nonatomic
,
weak
)
id
<
KWMMidDetailViewDelegate
>
delegate
;
@property
(
nonatomic
,
weak
)
BUYProduct
*
product
;
@property
(
nonatomic
,
weak
)
BUYProduct
*
product
;
@end
@end
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.m
View file @
d148bf5c
...
@@ -6,11 +6,20 @@
...
@@ -6,11 +6,20 @@
// Copyright © 2017年 kollway. All rights reserved.
// Copyright © 2017年 kollway. All rights reserved.
//
//
#import <WebKit/WebKit.h>
#import "KWMMidDetailView.h"
#import "KWMMidDetailView.h"
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMTBVSectionHeardView.h"
#import <JLRoutes/JLRoutes.h>
@interface
KWMMidDetailView
()
<
WKNavigationDelegate
,
WKScriptMessageHandler
>
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbDetail
;
@property
(
nonatomic
,
strong
)
WKWebView
*
webView
;
@property
(
nonatomic
,
strong
)
KWMTBVSectionHeardView
*
titleView
;
@interface
KWMMidDetailView
()
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbDetail
;
@end
@end
@implementation
KWMMidDetailView
@implementation
KWMMidDetailView
...
@@ -43,22 +52,72 @@
...
@@ -43,22 +52,72 @@
}
}
-
(
void
)
addView
{
-
(
void
)
addView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
NSStringFromClass
([
self
class
])
// [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class])
owner
:
self
// owner:self
options
:
nil
];
// options:nil];
self
.
titleView
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
50
)];
self
.
titleView
.
title
=
@"商品详情"
;
self
.
titleView
.
ivMore
.
hidden
=
YES
;
WKUserContentController
*
userContentController
=
[[
WKUserContentController
alloc
]
init
];
[
userContentController
addScriptMessageHandler
:
self
name
:
@"handle"
];
WKWebViewConfiguration
*
configutation
=
[[
WKWebViewConfiguration
alloc
]
init
];
configutation
.
userContentController
=
userContentController
;
self
.
webView
=
[[
WKWebView
alloc
]
initWithFrame
:
self
.
bounds
configuration
:
configutation
];
self
.
webView
.
navigationDelegate
=
self
;
// self.vView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
// [self addSubview:self.vView];
[
self
addSubview
:
self
.
webView
];
[
self
addSubview
:
self
.
titleView
];
self
.
webView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
self
.
titleView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
id
views
=
@{
@"web"
:
self
.
webView
,
@"title"
:
self
.
titleView
};
[
self
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"H:|[web]|"
options
:
0
metrics
:
nil
views
:
views
]];
[
self
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"H:|[title]|"
options
:
0
metrics
:
nil
views
:
views
]];
[
self
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"V:|[title(50)][web]|"
options
:
0
metrics
:
nil
views
:
views
]];
self
.
vView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
[
self
addSubview
:
self
.
vView
];
}
}
//- (void)layoutSubviews {
// [super layoutSubviews];
// self.webView.frame = self.bounds;
//}
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
_product
=
product
;
_product
=
product
;
if
(
product
&&
!
[
KWMStringUtil
isEmpty
:
product
.
stringDescription
]){
if
(
product
&&
product
.
htmlDescription
.
length
){
self
.
lbDetail
.
text
=
product
.
stringDescription
;
// self.lbDetail.text = product.htmlDescription;
// NSString *html = [NSString stringWithFormat:@"%@<script type='text/javascript'>window.webkit.messageHandlers.handle.postMessage(document.body.clientHeight)</scriot>",product.htmlDescription];
NSString
*
css
=
[
NSString
stringWithFormat
:
@"p{font-size:12px;}img{width:100%%;}*{padding:0;margin:0;max-width:%f}"
,
UI_SCREEN_WIDTH
];
NSString
*
html
=
[[
NSString
stringWithFormat
:
@"<meta name=
\"
viewport
\"
content=
\"
width=device-width, initial-scale=1.0 user-scalable=yes
\"
/><div id=
\"
container
\"
>%@<div><script type=
\"
text/javascript
\"
>function update() {window.webkit.messageHandlers.handle.postMessage({height:document.body.scrollHeight})} function timer(){ setTimeout(timer,1000); update()} function delay() { setTimeout(update,1000) } window.onload = update</script><style type=
\"
text/css
\"
>%@</style>"
,
product
.
htmlDescription
,
css
]
stringByReplacingOccurrencesOfString
:
@"src=
\"
//cdn.shopify.com"
withString
:
@"src=
\"
https://o42yton8r.qnssl.com"
];
[
self
.
webView
loadHTMLString
:
html
baseURL
:
nil
];
}
else
{
}
else
{
self
.
lbDetail
.
text
=
@"暂无商品描述"
;
// self.lbDetail.text = @"暂无商品描述";
self
.
hidden
=
YES
;
[
self
.
delegate
kwm_updatedHeight
:
0
];
}
}
}
}
-
(
void
)
webView
:
(
WKWebView
*
)
webView
decidePolicyForNavigationAction
:
(
WKNavigationAction
*
)
navigationAction
decisionHandler
:
(
void
(
^
)(
WKNavigationActionPolicy
))
decisionHandler
{
NSURL
*
url
=
navigationAction
.
request
.
URL
;
if
([
JLRoutes
canRouteURL
:
url
])
{
[
JLRoutes
routeURL
:
url
];
decisionHandler
(
WKNavigationActionPolicyCancel
);
}
else
{
decisionHandler
(
WKNavigationActionPolicyAllow
);
}
}
-
(
void
)
userContentController
:
(
WKUserContentController
*
)
userContentController
didReceiveScriptMessage
:
(
WKScriptMessage
*
)
message
{
NSNumber
*
height
=
[
message
.
body
objectForKey
:
@"height"
];
NSLog
(
@"fuck height: %@"
,
height
);
[
self
.
delegate
kwm_updatedHeight
:
height
.
floatValue
+
50
];
}
@end
@end
iCemarose/Class/UI/NewProduct/Cell/KWMSecondDetailView.h
View file @
d148bf5c
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
-
(
void
)
kwm_clickCollectionCell
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_clickCollectionCell
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_updatedSecondDetailViewHeight
:(
CGFloat
)
height
;
-
(
void
)
kwm_clickMore
:(
BOOL
)
isSameBrand
;
-
(
void
)
kwm_clickMore
:(
BOOL
)
isSameBrand
;
@end
@end
...
@@ -37,6 +39,10 @@
...
@@ -37,6 +39,10 @@
@property
(
nonatomic
)
NSString
*
brand
;
@property
(
nonatomic
)
NSString
*
brand
;
@property
(
nonatomic
)
NSNumber
*
productCount
;
@property
(
nonatomic
)
NSString
*
brandDescription
;
@property
(
nonatomic
)
NSInteger
count
;
@property
(
nonatomic
)
NSInteger
count
;
//isSameBrand 是否同一品牌商品
//isSameBrand 是否同一品牌商品
...
...
iCemarose/Class/UI/NewProduct/Cell/KWMSecondDetailView.m
View file @
d148bf5c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#import "KWMSecondDetailView.h"
#import "KWMSecondDetailView.h"
#import "KWMTBVSectionHeardView.h"
#import "KWMTBVSectionHeardView.h"
#import "KWMProductSameBrandView.h"
@interface
KWMSecondDetailView
()
@interface
KWMSecondDetailView
()
...
@@ -138,27 +139,30 @@ static NSString *idStr = @"KWMNewGoodsCell";
...
@@ -138,27 +139,30 @@ static NSString *idStr = @"KWMNewGoodsCell";
}
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
KWMTBVSectionHeardView
*
vTBVSectionHeard
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
60
)];
if
(
section
==
0
)
{
if
(
section
==
0
)
{
NSString
*
title
;
KWMProductSameBrandView
*
view
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"KWMProductSameBrandView"
owner
:
nil
options
:
nil
]
firstObject
];
if
(
self
.
brand
==
nil
){
view
.
frame
=
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
[
self
tableView
:
tableView
heightForHeaderInSection
:
section
]);
vTBVSectionHeard
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
40
)];
view
.
brandName
.
text
=
self
.
brand
?:
@"其他商品"
;
title
=
@"其他商品"
;
view
.
quantity
.
text
=
self
.
productCount
.
stringValue
?:
@"0"
;
}
else
{
view
.
brandDescription
.
text
=
self
.
brandDescription
;
title
=
[
NSString
stringWithFormat
:
@"%@
\n
其他商品"
,
self
.
brand
];
return
view
;
}
vTBVSectionHeard
.
lbSectionTitel
.
text
=
title
;
}
else
{
}
else
{
KWMTBVSectionHeardView
*
vTBVSectionHeard
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
60
)];
vTBVSectionHeard
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
40
)];
vTBVSectionHeard
=
[[
KWMTBVSectionHeardView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
40
)];
vTBVSectionHeard
.
lbSectionTitel
.
text
=
@"同类商品"
;
vTBVSectionHeard
.
lbSectionTitel
.
text
=
@"同类商品"
;
vTBVSectionHeard
.
ivMore
.
hidden
=
YES
;
return
vTBVSectionHeard
;
}
}
vTBVSectionHeard
.
ivMore
.
hidden
=
YES
;
return
vTBVSectionHeard
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
if
(
section
==
0
&&
self
.
brand
!=
nil
){
if
(
section
==
0
&&
self
.
brand
!=
nil
){
return
60
;
CGFloat
height
=
8
;
// height += [self.brandDescription sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11]}].height;
height
+=
[
self
.
brandDescription
boundingRectWithSize
:
CGSizeMake
(
UI_SCREEN_WIDTH
-
54
,
0
)
options
:
NSStringDrawingUsesLineFragmentOrigin
|
NSStringDrawingUsesFontLeading
attributes
:
@{
NSFontAttributeName
:
[
UIFont
fontWithName
:
@"Helvetica Neue"
size
:
11
]}
context
:
nil
].
size
.
height
;
[
self
.
delegate
kwm_updatedSecondDetailViewHeight
:
450
+
height
];
return
60
+
height
;
}
else
{
}
else
{
return
40
;
return
40
;
}
}
...
...
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
d148bf5c
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#import <PPNetworkHelper/PPNetworkHelper.h>
#import <PPNetworkHelper/PPNetworkHelper.h>
#import <TOWebViewController/NJKWebViewProgress.h>
#import <TOWebViewController/NJKWebViewProgress.h>
@interface
KWMNewProductVC
()
@interface
KWMNewProductVC
()
<
KWMMidDetailViewDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
KWMFirstDetailView
*
detailView1
;
@property
(
weak
,
nonatomic
)
IBOutlet
KWMFirstDetailView
*
detailView1
;
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightMidView
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightMidView
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
detailView2HeightConstraint
;
// 0 非自动 1 是加购 2 是立即购买
// 0 非自动 1 是加购 2 是立即购买
@property
(
assign
,
nonatomic
)
NSInteger
autoAddToBag
;
@property
(
assign
,
nonatomic
)
NSInteger
autoAddToBag
;
...
@@ -82,6 +84,7 @@
...
@@ -82,6 +84,7 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
self
initShopCartCount
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
}
}
...
@@ -98,7 +101,7 @@
...
@@ -98,7 +101,7 @@
self
.
colorArray
=
[
NSMutableArray
array
];
self
.
colorArray
=
[
NSMutableArray
array
];
self
.
detailView1
.
delegate
=
self
;
self
.
detailView1
.
delegate
=
self
;
self
.
detailView2
.
delegate
=
self
;
self
.
detailView2
.
delegate
=
self
;
self
.
midDetailView
.
delegate
=
self
;
if
(
self
.
product
){
if
(
self
.
product
){
self
.
midDetailView
.
product
=
self
.
product
;
self
.
midDetailView
.
product
=
self
.
product
;
[
self
.
detailView1
setData
:
self
.
product
];
[
self
.
detailView1
setData
:
self
.
product
];
...
@@ -109,8 +112,8 @@
...
@@ -109,8 +112,8 @@
}
}
[
self
requestColorMetafield
];
[
self
requestColorMetafield
];
[
self
requestAdminProduct
];
[
self
requestAdminProduct
];
[
self
initShopCartCount
];
//
[self initShopCartCount];
[
self
initMidViewHight
];
//
[self initMidViewHight];
[
self
.
btnLike
setImage
:[
UIImage
imageNamed
:
@"ic_like_unable"
]
forState
:
UIControlStateNormal
];
[
self
.
btnLike
setImage
:[
UIImage
imageNamed
:
@"ic_like_unable"
]
forState
:
UIControlStateNormal
];
...
@@ -123,22 +126,22 @@
...
@@ -123,22 +126,22 @@
[
self
.
btnShopCart
setTitle
:
count
.
stringValue
forState
:
UIControlStateNormal
];
[
self
.
btnShopCart
setTitle
:
count
.
stringValue
forState
:
UIControlStateNormal
];
}
}
-
(
void
)
initMidViewHight
{
//
-(void)initMidViewHight{
if
(
self
.
product
){
//
if(self.product){
if
([
KWMStringUtil
isEmpty
:
self
.
product
.
stringDescription
]){
//
if([KWMStringUtil isEmpty:self.product.stringDescription]){
self
.
heightMidView
.
constant
=
86
.
5
;
//
self.heightMidView.constant = 86.5;
}
else
{
//
}else{
NSString
*
detail
=
self
.
product
.
stringDescription
;
//
NSString *detail = self.product.stringDescription;
//获得字体,计算文字显示所需高度
//
//获得字体,计算文字显示所需高度
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
11
];
//
UIFont *font = [UIFont systemFontOfSize:11];
if
(
SYSTEM_VERSION_LESS_THAN
(
@"9.0"
)){
//
if(SYSTEM_VERSION_LESS_THAN(@"9.0")){
[
UIFont
fontWithName
:
@"PingFang SC"
size
:
11
];
//
[UIFont fontWithName:@"PingFang SC" size:11];
}
//
}
NSInteger
heightLbDetail
=
[
KWMStringUtil
getLabelHeight
:
detail
labelFont
:
font
textWidth
:
UI_SCREEN_WIDTH
-
20
].
height
;
//
NSInteger heightLbDetail = [KWMStringUtil getLabelHeight:detail labelFont:font textWidth:UI_SCREEN_WIDTH - 20].height;
self
.
heightMidView
.
constant
=
(
86
.
5
-
15
+
heightLbDetail
);
//
self.heightMidView.constant = (86.5 - 15 + heightLbDetail);
}
//
}
}
//
}
}
//
}
//请求API得到颜色Meterfield后才会调用这个.
//请求API得到颜色Meterfield后才会调用这个.
...
@@ -286,6 +289,10 @@
...
@@ -286,6 +289,10 @@
}
}
#pragma mark -- KWMSecondDetailViewDelegate
#pragma mark -- KWMSecondDetailViewDelegate
-
(
void
)
kwm_updatedSecondDetailViewHeight
:
(
CGFloat
)
height
{
self
.
detailView2HeightConstraint
.
constant
=
height
;
}
-
(
void
)
kwm_clickCollectionCell
:
(
BUYProduct
*
)
product
{
-
(
void
)
kwm_clickCollectionCell
:
(
BUYProduct
*
)
product
{
if
(
!
product
){
if
(
!
product
){
return
;
return
;
...
@@ -435,6 +442,12 @@
...
@@ -435,6 +442,12 @@
}
}
}
}
#pragma mark - KWMMidViewDetailDelegate
-
(
void
)
kwm_updatedHeight
:
(
CGFloat
)
height
{
self
.
heightMidView
.
constant
=
height
;
}
#pragma mark - API BUYClient+Storefront
#pragma mark - API BUYClient+Storefront
-
(
void
)
requestProductDetail
{
-
(
void
)
requestProductDetail
{
if
(
!
(
self
.
productId
||
self
.
product
||
self
.
handle
)){
if
(
!
(
self
.
productId
||
self
.
product
||
self
.
handle
)){
...
@@ -449,7 +462,7 @@
...
@@ -449,7 +462,7 @@
}
else
if
(
product
){
}
else
if
(
product
){
weakSelf
.
product
=
product
;
weakSelf
.
product
=
product
;
weakSelf
.
productId
=
product
.
identifier
;
weakSelf
.
productId
=
product
.
identifier
;
[
weakSelf
initMidViewHight
];
//
[weakSelf initMidViewHight];
weakSelf
.
midDetailView
.
product
=
product
;
weakSelf
.
midDetailView
.
product
=
product
;
[
weakSelf
.
detailView1
setData
:
product
];
[
weakSelf
.
detailView1
setData
:
product
];
[
self
requestBrandProducts
:
1
];
[
self
requestBrandProducts
:
1
];
...
@@ -490,11 +503,22 @@
...
@@ -490,11 +503,22 @@
NSString
*
handle
=
[
KWMStringUtil
deleteOtherCharExceptLetterWithLine
:
self
.
product
.
vendor
];
NSString
*
handle
=
[
KWMStringUtil
deleteOtherCharExceptLetterWithLine
:
self
.
product
.
vendor
];
self
.
detailView2
.
isLoadingSameBrand
=
YES
;
self
.
detailView2
.
isLoadingSameBrand
=
YES
;
__weak
KWMNewProductVC
*
weakSelf
=
self
;
__weak
KWMNewProductVC
*
weakSelf
=
self
;
[
self
.
api
searchProduct
:@{
@"keyword"
:
self
.
product
.
vendor
}
success
:
^
(
NSURLSessionDataTask
*
task
,
KWMSearchResult
*
result
)
{
// weakSelf.detailView2.isLoadingSameBrand = NO;
weakSelf
.
detailView2
.
brand
=
weakSelf
.
product
.
vendor
;
weakSelf
.
detailView2
.
productCount
=
result
.
products
.
total
;
// [weakSelf.detailView2 setData:result.productList isSameBrand:YES];
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
// weakSelf.detailView2.isLoadingSameBrand = NO;
}];
[
self
.
client
getCollectionByHandle
:
handle
completion
:
^
(
BUYCollection
*
_Nullable
collection
,
NSError
*
_Nullable
error
)
{
[
self
.
client
getCollectionByHandle
:
handle
completion
:
^
(
BUYCollection
*
_Nullable
collection
,
NSError
*
_Nullable
error
)
{
if
(
collection
&&
!
error
){
if
(
collection
&&
!
error
){
weakSelf
.
detailView2
.
brandDescription
=
collection
.
stringDescription
;
[
weakSelf
.
client
getProductsPage
:
page
inCollection
:
collection
.
identifier
completion
:^
(
NSArray
<
BUYProduct
*>
*
_Nullable
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
_Nullable
error
)
{
[
weakSelf
.
client
getProductsPage
:
page
inCollection
:
collection
.
identifier
completion
:^
(
NSArray
<
BUYProduct
*>
*
_Nullable
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
_Nullable
error
)
{
weakSelf
.
detailView2
.
isLoadingSameBrand
=
NO
;
weakSelf
.
detailView2
.
isLoadingSameBrand
=
NO
;
weakSelf
.
detailView2
.
brand
=
weakSelf
.
product
.
vendor
;
[
weakSelf
.
detailView2
setData
:
products
isSameBrand
:
YES
];
[
weakSelf
.
detailView2
setData
:
products
isSameBrand
:
YES
];
}];
}];
...
...
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
View file @
d148bf5c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
2120"
systemVersion=
"16F73
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
3196
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
2088
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3173
"
/>
<capability
name=
"Aspect ratio constraints"
minToolsVersion=
"5.1"
/>
<capability
name=
"Aspect ratio constraints"
minToolsVersion=
"5.1"
/>
<capability
name=
"Constraints with non-1.0 multipliers"
minToolsVersion=
"5.1"
/>
<capability
name=
"Constraints with non-1.0 multipliers"
minToolsVersion=
"5.1"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Medium
</string>
<string>
PingFangSC-Regular
</string>
</array>
</customFonts>
<scenes>
<scenes>
<!--新商品详情-->
<!--新商品详情-->
<scene
sceneID=
"fO1-9n-Cyi"
>
<scene
sceneID=
"fO1-9n-Cyi"
>
...
@@ -79,7 +85,7 @@
...
@@ -79,7 +85,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"375"
height=
"567"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"375"
height=
"567"
/>
<subviews>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"X5Y-fo-qOg"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"X5Y-fo-qOg"
>
<rect
key=
"frame"
x=
"-0.5"
y=
"0.0"
width=
"375"
height=
"11
5
1.5"
/>
<rect
key=
"frame"
x=
"-0.5"
y=
"0.0"
width=
"375"
height=
"11
6
1.5"
/>
<subviews>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2KH-pA-K5l"
customClass=
"KWMFirstDetailView"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2KH-pA-K5l"
customClass=
"KWMFirstDetailView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"625"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"625"
/>
...
@@ -93,10 +99,10 @@
...
@@ -93,10 +99,10 @@
</constraints>
</constraints>
</view>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pyO-1P-iAa"
customClass=
"KWMSecondDetailView"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"pyO-1P-iAa"
customClass=
"KWMSecondDetailView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"711.5"
width=
"375"
height=
"4
4
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"711.5"
width=
"375"
height=
"4
5
0"
/>
<color
key=
"backgroundColor"
red=
"0.82745098039999998"
green=
"0.83921568629999999"
blue=
"0.85098039219999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"backgroundColor"
red=
"0.82745098039999998"
green=
"0.83921568629999999"
blue=
"0.85098039219999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"4
4
0"
id=
"SH3-J6-rwf"
/>
<constraint
firstAttribute=
"height"
constant=
"4
5
0"
id=
"SH3-J6-rwf"
/>
</constraints>
</constraints>
</view>
</view>
</subviews>
</subviews>
...
@@ -222,6 +228,7 @@
...
@@ -222,6 +228,7 @@
<outlet
property=
"btnShopCart"
destination=
"gbx-rg-A8B"
id=
"vel-Ab-0rI"
/>
<outlet
property=
"btnShopCart"
destination=
"gbx-rg-A8B"
id=
"vel-Ab-0rI"
/>
<outlet
property=
"detailView1"
destination=
"2KH-pA-K5l"
id=
"ynO-by-UfZ"
/>
<outlet
property=
"detailView1"
destination=
"2KH-pA-K5l"
id=
"ynO-by-UfZ"
/>
<outlet
property=
"detailView2"
destination=
"pyO-1P-iAa"
id=
"scJ-Iv-fnz"
/>
<outlet
property=
"detailView2"
destination=
"pyO-1P-iAa"
id=
"scJ-Iv-fnz"
/>
<outlet
property=
"detailView2HeightConstraint"
destination=
"SH3-J6-rwf"
id=
"H8q-0s-nUI"
/>
<outlet
property=
"heightMidView"
destination=
"Pwf-vg-Z3k"
id=
"h8Z-Kr-bXi"
/>
<outlet
property=
"heightMidView"
destination=
"Pwf-vg-Z3k"
id=
"h8Z-Kr-bXi"
/>
<outlet
property=
"midDetailView"
destination=
"t55-gT-VGG"
id=
"BRI-de-9Jz"
/>
<outlet
property=
"midDetailView"
destination=
"t55-gT-VGG"
id=
"BRI-de-9Jz"
/>
<outlet
property=
"scrollView"
destination=
"T6J-Gp-5iu"
id=
"ZLc-Xh-Pyk"
/>
<outlet
property=
"scrollView"
destination=
"T6J-Gp-5iu"
id=
"ZLc-Xh-Pyk"
/>
...
...
iCemarose/Class/UI/Product/Cell/KWMCollectionCell.h
View file @
d148bf5c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "Buy/Buy.h"
#import "Buy/Buy.h"
#import "KWMDataProduct.h"
@interface
KWMCollectionCell
:
UICollectionViewCell
@interface
KWMCollectionCell
:
UICollectionViewCell
...
@@ -22,5 +23,6 @@
...
@@ -22,5 +23,6 @@
@property
(
nonatomic
)
BOOL
isMore
;
@property
(
nonatomic
)
BOOL
isMore
;
-
(
void
)
setData
:(
BUYProduct
*
)
product
;
-
(
void
)
setData
:(
BUYProduct
*
)
product
;
-
(
void
)
setDataProduct
:(
KWMDataProduct
*
)
product
;
@end
@end
iCemarose/Class/UI/Product/Cell/KWMCollectionCell.m
View file @
d148bf5c
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
-
(
void
)
setData
:
(
BUYProduct
*
)
product
{
-
(
void
)
setData
:
(
BUYProduct
*
)
product
{
if
(
product
!=
nil
){
if
(
product
!=
nil
){
if
([
product
isKindOfClass
:[
KWMDataProduct
class
]])
{
[
self
setDataProduct
:(
KWMDataProduct
*
)
product
];
return
;
}
self
.
product
=
product
;
self
.
product
=
product
;
self
.
lbBrand
.
text
=
product
.
title
;
self
.
lbBrand
.
text
=
product
.
title
;
NSString
*
imageUrl
=
[
KWMImageUtil
getProductImageUrl
:
product
ImageSize
:
SmallImage
];
NSString
*
imageUrl
=
[
KWMImageUtil
getProductImageUrl
:
product
ImageSize
:
SmallImage
];
...
@@ -77,5 +81,45 @@
...
@@ -77,5 +81,45 @@
}
}
}
}
-
(
void
)
setDataProduct
:
(
KWMDataProduct
*
)
product
{
self
.
lbBrand
.
text
=
product
.
vendor
;
NSString
*
imageUrl
=
[
KWMImageUtil
getProductImageUrl
:
product
ImageSize
:
SmallImage
];
NSURL
*
imageURL
=
[
NSURL
URLWithString
:
imageUrl
];
[
self
.
ivCollectionCell
sd_setImageWithURL
:
imageURL
placeholderImage
:[
UIImage
imageNamed
:
@"ic_loading"
]];
KWMVariants
*
variant
=
product
.
variants
.
firstObject
;
if
(
variant
.
compareAtPrice
)
{
self
.
lbPrice
.
hidden
=
NO
;
self
.
priceSpace
.
constant
=
4
;
// NSString *priceString = productVariant.compareAtPriceFormatted;
NSString
*
priceString
=
variant
.
compareAtPrice
.
priceFormatted
;
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
self
.
lbPrice
.
attributedText
=
attribtStr
;
}
else
{
self
.
lbPrice
.
hidden
=
YES
;
self
.
lbPrice
.
text
=
nil
;
self
.
priceSpace
.
constant
=
0
;
}
NSString
*
priceString
,
*
discountStr
;
if
(
variant
.
compareAtPrice
)
{
self
.
lbPrice
.
hidden
=
NO
;
self
.
priceSpace
.
constant
=
4
;
// priceString = [NSString stringWithFormat:@"¥%@",[KWMStringUtil getEUR2CNYstring:productVariant.compareAtPrice]];
priceString
=
variant
.
compareAtPrice
.
priceFormatted
;
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
self
.
lbPrice
.
attributedText
=
attribtStr
;
}
else
{
self
.
lbPrice
.
hidden
=
YES
;
self
.
lbPrice
.
text
=
nil
;
self
.
priceSpace
.
constant
=
0
;
// self.discountLeft.constant = -28;
// self.lbDiscount.textAlignment = NSTextAlignmentCenter;
}
// discountStr = [NSString stringWithFormat:@"¥%@",[KWMStringUtil getEUR2CNYstring:productVariant.price]];
discountStr
=
variant
.
price
.
priceFormatted
;
self
.
lbDiscount
.
text
=
discountStr
;
}
@end
@end
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
View file @
d148bf5c
...
@@ -312,11 +312,11 @@
...
@@ -312,11 +312,11 @@
// // init checkout 这里应该也没用了 因为self.cart不存在
// // init checkout 这里应该也没用了 因为self.cart不存在
// checkout = [[BUYCheckout alloc] initWithModelManager:self.client.modelManager cart:self.cart];
// checkout = [[BUYCheckout alloc] initWithModelManager:self.client.modelManager cart:self.cart];
// }
// }
NSDictionary
*
checkoutCache
=
[
self
.
userDao
checkOutCache
];
//
NSDictionary *checkoutCache = [self.userDao checkOutCache];
BUYCheckout
*
checkout
=
nil
;
BUYCheckout
*
checkout
=
nil
;
if
(
!
checkoutCache
||
self
.
cartCookie
)
{
//
if (!checkoutCache || self.cartCookie) {
checkout
=
[[
BUYCheckout
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
nil
];
checkout
=
[[
BUYCheckout
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
nil
];
}
//
}
// if(self.address){
// if(self.address){
if
([
self
checkAddress
:
self
.
address
]){
if
([
self
checkAddress
:
self
.
address
]){
KWMSelectAddressVC
*
addressVC
=
(
KWMSelectAddressVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMSelectAddressVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
KWMSelectAddressVC
*
addressVC
=
(
KWMSelectAddressVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMSelectAddressVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
...
@@ -554,10 +554,11 @@
...
@@ -554,10 +554,11 @@
[
newReq
setValue
:
this
.
client
.
customerToken
.
accessToken
forHTTPHeaderField
:
@"X-Shopify-Customer-Access-Token"
];
[
newReq
setValue
:
this
.
client
.
customerToken
.
accessToken
forHTTPHeaderField
:
@"X-Shopify-Customer-Access-Token"
];
}
}
// 如果有checkout说明是新订单 直接更新订单地址就好 如果没有checkout说明是旧订单已经有地址所以无需更新
// 如果有checkout说明是新订单 直接更新订单地址就好 如果没有checkout说明是旧订单已经有地址所以无需更新
if
(
checkout
||
this
.
cartCookie
)
{
// 170922 所有订单全部刷新地址
// if (checkout || this.cartCookie) {
newReq
.
HTTPMethod
=
@"PATCH"
;
newReq
.
HTTPMethod
=
@"PATCH"
;
[
newReq
setHTTPBody
:[
NSJSONSerialization
dataWithJSONObject
:[
checkout
jsonDictionaryForCheckout
]
options
:
0
error
:
nil
]];
[
newReq
setHTTPBody
:[
NSJSONSerialization
dataWithJSONObject
:[
checkout
jsonDictionaryForCheckout
]
options
:
0
error
:
nil
]];
}
//
}
return
newReq
;
return
newReq
;
}];
}];
...
...
iCemarose/Class/Util/KWMImageUtil.m
View file @
d148bf5c
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#import "KWMImageUtil.h"
#import "KWMImageUtil.h"
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "Buy/Buy.h"
#import "Buy/Buy.h"
#import <RegexKitLite/RegexKitLite.h>
@implementation
KWMImageUtil
{
@implementation
KWMImageUtil
{
...
@@ -181,18 +182,22 @@
...
@@ -181,18 +182,22 @@
+
(
NSString
*
)
getProductImageUrlByOriginalUrl
:
(
NSString
*
)
originalImgUrl
ImageSize
:
(
NSInteger
)
ImageSize
{
+
(
NSString
*
)
getProductImageUrlByOriginalUrl
:
(
NSString
*
)
originalImgUrl
ImageSize
:
(
NSInteger
)
ImageSize
{
NSMutableString
*
newImageUrl
=
[[
NSMutableString
alloc
]
initWithString
:
@""
];;
NSMutableString
*
newImageUrl
=
[[
NSMutableString
alloc
]
initWithString
:
[
originalImgUrl
stringByReplacingOccurrencesOfString
:
@"?"
withString
:
@"%3F"
]
];;
//https://cdn.shopify.com/s/files/1/1089/5284/products/5413_1.jpg?v==1459708223 转换为
//https://cdn.shopify.com/s/files/1/1089/5284/products/5413_1.jpg?v==1459708223 转换为
//https://o42yton8r.qnssl.com/s/files/1/1089/5284/products/5413_1.jpg?imageView2/1/w/300/h/300/v==1459708223
//https://o42yton8r.qnssl.com/s/files/1/1089/5284/products/5413_1.jpg?imageView2/1/w/300/h/300/v==1459708223
if
(
originalImgUrl
){
// if(originalImgUrl){
NSRange
startRange
=
[
originalImgUrl
rangeOfString
:
@"?"
];
// NSRange startRange = [originalImgUrl rangeOfString:@"?"];
if
(
startRange
.
location
!=
NSNotFound
)
{
// if (startRange.location != NSNotFound) {
newImageUrl
=
[[
NSMutableString
alloc
]
initWithString
:
originalImgUrl
];
// newImageUrl=[[NSMutableString alloc]initWithString:originalImgUrl];
NSArray
<
NSString
*>
*
imageWH
=
[
self
getImageWH
:
ImageSize
];
// NSArray<NSString *> *imageWH = [self getImageWH:ImageSize];
NSString
*
size
=
[
NSString
stringWithFormat
:
@"imageView2/2/w/%@/h/%@/"
,
imageWH
[
0
],
imageWH
[
1
]];
// NSString *size = [NSString stringWithFormat:@"imageView2/2/w/%@/h/%@/",imageWH[0],imageWH[1]];
[
newImageUrl
insertString
:
size
atIndex
:
startRange
.
location
+
1
];
// [newImageUrl insertString:size atIndex:startRange.location+1];
}
// }
}
// }
NSArray
<
NSString
*>
*
imageWH
=
[
self
getImageWH
:
ImageSize
];
NSString
*
size
=
[
NSString
stringWithFormat
:
@"?imageView2/2/w/%@/h/%@/"
,
imageWH
[
0
],
imageWH
[
1
]];
[
newImageUrl
appendString
:
size
];
return
[
newImageUrl
stringByReplacingOccurrencesOfString
:
@"cdn.shopify.com"
withString
:
Image_Domain
];
return
[
newImageUrl
stringByReplacingOccurrencesOfString
:
@"cdn.shopify.com"
withString
:
Image_Domain
];
}
}
...
...
iCemarose/Class/View/KWMProductSameBrandView.h
0 → 100644
View file @
d148bf5c
//
// KWMProductSameBrandView.h
// iCemarose
//
// Created by Sanchew on 2017/9/13.
// Copyright © 2017年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
KWMProductSameBrandView
:
UIView
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
brandName
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
quantity
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
brandDescription
;
@end
iCemarose/Class/View/KWMProductSameBrandView.m
0 → 100644
View file @
d148bf5c
//
// KWMProductSameBrandView.m
// iCemarose
//
// Created by Sanchew on 2017/9/13.
// Copyright © 2017年 kollway. All rights reserved.
//
#import "KWMProductSameBrandView.h"
@implementation
KWMProductSameBrandView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
iCemarose/Class/View/KWMProductSameBrandView.xib
0 → 100644
View file @
d148bf5c
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"13196"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13173"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"HelveticaNeue.ttc"
>
<string>
HelveticaNeue
</string>
</array>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Light
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"lkh-aL-1GL"
customClass=
"KWMProductSameBrandView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"168"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"HOD-ku-7td"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"60"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vRx-YQ-XJY"
userLabel=
"vLine"
>
<rect
key=
"frame"
x=
"50"
y=
"29"
width=
"275"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.84705882352941175"
green=
"0.85882352941176465"
blue=
"0.87058823529411766"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"pCT-z7-EiF"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Bjg-FM-5CZ"
>
<rect
key=
"frame"
x=
"112.5"
y=
"13"
width=
"150"
height=
"34.5"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"CARAMEL"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"2"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KUN-d7-GjA"
>
<rect
key=
"frame"
x=
"42"
y=
"0.0"
width=
"67"
height=
"20"
/>
<color
key=
"backgroundColor"
red=
"0.99607843139999996"
green=
"0.99607843139999996"
blue=
"0.99607843139999996"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Light"
family=
"PingFang SC"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ZTt-H6-7G7"
>
<rect
key=
"frame"
x=
"43"
y=
"20"
width=
"65.5"
height=
"14.5"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"在售商品"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"E7X-na-hKe"
>
<rect
key=
"frame"
x=
"0.0"
y=
"-0.5"
width=
"44"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Light"
family=
"PingFang SC"
pointSize=
"11"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"18"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"rxk-gL-dLk"
>
<rect
key=
"frame"
x=
"44"
y=
"2.5"
width=
"10.5"
height=
"11"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"9"
/>
<color
key=
"textColor"
red=
"0.94509803921568625"
green=
"0.5725490196078431"
blue=
"0.60392156862745094"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"件"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"p1t-DN-mFY"
>
<rect
key=
"frame"
x=
"54.5"
y=
"0.0"
width=
"11"
height=
"15.5"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Light"
family=
"PingFang SC"
pointSize=
"11"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"E7X-na-hKe"
firstAttribute=
"centerY"
secondItem=
"ZTt-H6-7G7"
secondAttribute=
"centerY"
id=
"56J-y5-yTh"
/>
<constraint
firstItem=
"rxk-gL-dLk"
firstAttribute=
"leading"
secondItem=
"E7X-na-hKe"
secondAttribute=
"trailing"
id=
"8eS-6P-e8i"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"p1t-DN-mFY"
secondAttribute=
"trailing"
id=
"Gsb-zd-8fw"
/>
<constraint
firstItem=
"E7X-na-hKe"
firstAttribute=
"leading"
secondItem=
"ZTt-H6-7G7"
secondAttribute=
"leading"
id=
"QPA-Nm-O2h"
/>
<constraint
firstItem=
"p1t-DN-mFY"
firstAttribute=
"leading"
secondItem=
"rxk-gL-dLk"
secondAttribute=
"trailing"
id=
"XWt-t9-Rud"
/>
<constraint
firstAttribute=
"height"
constant=
"14.5"
id=
"anI-0U-Bsc"
/>
<constraint
firstItem=
"p1t-DN-mFY"
firstAttribute=
"centerY"
secondItem=
"ZTt-H6-7G7"
secondAttribute=
"centerY"
id=
"xcu-fp-NBz"
/>
<constraint
firstItem=
"rxk-gL-dLk"
firstAttribute=
"centerY"
secondItem=
"ZTt-H6-7G7"
secondAttribute=
"centerY"
id=
"xxb-pW-1qQ"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"KUN-d7-GjA"
firstAttribute=
"centerX"
secondItem=
"Bjg-FM-5CZ"
secondAttribute=
"centerX"
id=
"4Sf-bv-fyE"
/>
<constraint
firstItem=
"KUN-d7-GjA"
firstAttribute=
"top"
secondItem=
"Bjg-FM-5CZ"
secondAttribute=
"top"
id=
"M4m-OY-egt"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"ZTt-H6-7G7"
secondAttribute=
"bottom"
id=
"Pti-yo-gb9"
/>
<constraint
firstItem=
"ZTt-H6-7G7"
firstAttribute=
"centerX"
secondItem=
"Bjg-FM-5CZ"
secondAttribute=
"centerX"
id=
"RbY-Bb-AhI"
/>
<constraint
firstItem=
"ZTt-H6-7G7"
firstAttribute=
"top"
secondItem=
"KUN-d7-GjA"
secondAttribute=
"bottom"
id=
"UvS-LR-Wx9"
/>
<constraint
firstAttribute=
"width"
constant=
"150"
id=
"V6r-uC-oIi"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"Bjg-FM-5CZ"
firstAttribute=
"centerX"
secondItem=
"HOD-ku-7td"
secondAttribute=
"centerX"
id=
"5XU-RV-9Dm"
/>
<constraint
firstItem=
"vRx-YQ-XJY"
firstAttribute=
"leading"
secondItem=
"HOD-ku-7td"
secondAttribute=
"leading"
constant=
"50"
id=
"Fl3-o0-5aK"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"vRx-YQ-XJY"
secondAttribute=
"trailing"
constant=
"50"
id=
"Fvr-jg-GQq"
/>
<constraint
firstItem=
"vRx-YQ-XJY"
firstAttribute=
"centerX"
secondItem=
"HOD-ku-7td"
secondAttribute=
"centerX"
id=
"J4p-hm-ZEZ"
/>
<constraint
firstItem=
"Bjg-FM-5CZ"
firstAttribute=
"centerY"
secondItem=
"HOD-ku-7td"
secondAttribute=
"centerY"
id=
"XKd-Uo-Hrb"
/>
<constraint
firstItem=
"vRx-YQ-XJY"
firstAttribute=
"centerY"
secondItem=
"HOD-ku-7td"
secondAttribute=
"centerY"
id=
"k7a-6J-bja"
/>
<constraint
firstItem=
"Bjg-FM-5CZ"
firstAttribute=
"centerY"
secondItem=
"HOD-ku-7td"
secondAttribute=
"centerY"
id=
"nBg-pC-9iz"
/>
<constraint
firstAttribute=
"height"
constant=
"60"
id=
"rEh-tF-BWI"
/>
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"description"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Khe-9f-93V"
>
<rect
key=
"frame"
x=
"27"
y=
"60"
width=
"321"
height=
"100"
/>
<fontDescription
key=
"fontDescription"
name=
"HelveticaNeue"
family=
"Helvetica Neue"
pointSize=
"11"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"Khe-9f-93V"
firstAttribute=
"top"
secondItem=
"HOD-ku-7td"
secondAttribute=
"bottom"
id=
"5t1-nL-N0O"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Khe-9f-93V"
secondAttribute=
"bottom"
constant=
"8"
id=
"MHF-pJ-ibs"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Khe-9f-93V"
secondAttribute=
"trailing"
constant=
"27"
id=
"N7N-YT-2Cp"
/>
<constraint
firstItem=
"HOD-ku-7td"
firstAttribute=
"leading"
secondItem=
"lkh-aL-1GL"
secondAttribute=
"leading"
id=
"byX-St-DsE"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"HOD-ku-7td"
secondAttribute=
"trailing"
id=
"mKP-aJ-ZMI"
/>
<constraint
firstItem=
"HOD-ku-7td"
firstAttribute=
"top"
secondItem=
"lkh-aL-1GL"
secondAttribute=
"top"
id=
"tzW-1k-16b"
/>
<constraint
firstItem=
"Khe-9f-93V"
firstAttribute=
"leading"
secondItem=
"lkh-aL-1GL"
secondAttribute=
"leading"
constant=
"27"
id=
"wWm-nF-cQ7"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"brandDescription"
destination=
"Khe-9f-93V"
id=
"cMj-oC-A33"
/>
<outlet
property=
"brandName"
destination=
"KUN-d7-GjA"
id=
"wpk-ud-vgq"
/>
<outlet
property=
"quantity"
destination=
"rxk-gL-dLk"
id=
"oqR-Hh-Wij"
/>
</connections>
<point
key=
"canvasLocation"
x=
"-304.5"
y=
"9"
/>
</view>
</objects>
</document>
iCemarose/Class/View/KWMTBVSectionHeardView.h
View file @
d148bf5c
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
@property
(
nonatomic
)
KWMNewGoodsModel
*
goodsModel
;
@property
(
nonatomic
)
KWMNewGoodsModel
*
goodsModel
;
@property
(
nonatomic
)
NSString
*
title
;
@property
(
weak
,
nonatomic
)
id
<
KWMTBVSectionHeardViewDelegate
>
delegate
;
@property
(
weak
,
nonatomic
)
id
<
KWMTBVSectionHeardViewDelegate
>
delegate
;
@end
@end
iCemarose/Class/View/KWMTBVSectionHeardView.m
View file @
d148bf5c
...
@@ -59,6 +59,10 @@
...
@@ -59,6 +59,10 @@
}
}
}
}
-
(
void
)
setTitle
:
(
NSString
*
)
title
{
_lbSectionTitel
.
text
=
title
;
}
-
(
void
)
onClickWacthMore
:
(
UITapGestureRecognizer
*
)
tapGesture
{
-
(
void
)
onClickWacthMore
:
(
UITapGestureRecognizer
*
)
tapGesture
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
kwm_watchMoreProductsByBrand
:
AndTitle
:
)])
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
kwm_watchMoreProductsByBrand
:
AndTitle
:
)])
{
[
self
.
delegate
kwm_watchMoreProductsByBrand
:
_goodsModel
AndTitle
:
_lbSectionTitel
.
text
];
[
self
.
delegate
kwm_watchMoreProductsByBrand
:
_goodsModel
AndTitle
:
_lbSectionTitel
.
text
];
...
...
iCemarose/Class/View/KWMTBVSectionHeardView.xib
View file @
d148bf5c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
1542"
systemVersion=
"16B2555
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
3196
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
1524
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3173
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Light
</string>
</array>
</customFonts>
<objects>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMTBVSectionHeardView"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMTBVSectionHeardView"
>
<connections>
<connections>
...
@@ -54,27 +59,17 @@
...
@@ -54,27 +59,17 @@
</imageView>
</imageView>
</subviews>
</subviews>
<constraints>
<constraints>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"centerY"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerY"
id=
"9nq-Ez-yrN"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"wdX-Ml-DYY"
secondAttribute=
"trailing"
constant=
"140"
id=
"NEV-2U-wJ5"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"owh-51-VTC"
secondAttribute=
"trailing"
constant=
"20"
id=
"NS0-1s-TK1"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"owh-51-VTC"
secondAttribute=
"trailing"
constant=
"20"
id=
"NS0-1s-TK1"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"wdX-Ml-DYY"
secondAttribute=
"bottom"
id=
"PA5-Nd-lp4"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"wdX-Ml-DYY"
secondAttribute=
"bottom"
id=
"PA5-Nd-lp4"
/>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"top"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"top"
id=
"cHx-1l-c6C"
/>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"top"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"top"
id=
"cHx-1l-c6C"
/>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"centerX"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerX"
id=
"hFz-IN-tkC"
/>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"centerX"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerX"
id=
"hFz-IN-tkC"
/>
<constraint
firstItem=
"owh-51-VTC"
firstAttribute=
"centerY"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerY"
id=
"hO5-ch-Xcn"
/>
<constraint
firstItem=
"owh-51-VTC"
firstAttribute=
"centerY"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerY"
id=
"hO5-ch-Xcn"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"aAy-jd-lsA"
secondAttribute=
"trailing"
constant=
"50"
id=
"k3t-q6-hhh"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"aAy-jd-lsA"
secondAttribute=
"trailing"
constant=
"50"
id=
"k3t-q6-hhh"
/>
<constraint
firstItem=
"wdX-Ml-DYY"
firstAttribute=
"leading"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"leading"
constant=
"140"
id=
"op9-bF-1ab"
/>
<constraint
firstItem=
"aAy-jd-lsA"
firstAttribute=
"leading"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"leading"
constant=
"50"
id=
"pbZ-Az-bo4"
/>
<constraint
firstItem=
"aAy-jd-lsA"
firstAttribute=
"leading"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"leading"
constant=
"50"
id=
"pbZ-Az-bo4"
/>
<constraint
firstItem=
"aAy-jd-lsA"
firstAttribute=
"centerY"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerY"
id=
"zQe-eq-mgX"
/>
<constraint
firstItem=
"aAy-jd-lsA"
firstAttribute=
"centerY"
secondItem=
"PIL-ko-rzF"
secondAttribute=
"centerY"
id=
"zQe-eq-mgX"
/>
</constraints>
</constraints>
<nil
key=
"simulatedStatusBarMetrics"
/>
<nil
key=
"simulatedStatusBarMetrics"
/>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"9nq-Ez-yrN"
/>
<exclude
reference=
"NEV-2U-wJ5"
/>
<exclude
reference=
"op9-bF-1ab"
/>
</mask>
</variation>
<point
key=
"canvasLocation"
x=
"559.5"
y=
"-51"
/>
<point
key=
"canvasLocation"
x=
"559.5"
y=
"-51"
/>
</view>
</view>
</objects>
</objects>
...
...
iCemarose/Info.plist
View file @
d148bf5c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.5.
6
<
/string
>
<
string
>
1.5.
7
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
...
@@ -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
>
2017090617
<
/string
>
<
string
>
1.5.7.4
<
/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