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
a87f57fc
Commit
a87f57fc
authored
Nov 10, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配iphoneX
parent
b56408f9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
202 additions
and
175 deletions
+202
-175
Main.storyboard
iCemarose/Base.lproj/Main.storyboard
+0
-0
Brand.storyboard
iCemarose/Class/UI/Brand/Brand.storyboard
+15
-15
KWMBarandSelectView.m
iCemarose/Class/UI/Brand/Cell/KWMBarandSelectView.m
+4
-10
KWMBarandSelectView.xib
iCemarose/Class/UI/Brand/Cell/KWMBarandSelectView.xib
+11
-6
KWMCarCountView.m
iCemarose/Class/UI/Brand/Cell/KWMCarCountView.m
+6
-12
KWMCarCountView.xib
iCemarose/Class/UI/Brand/Cell/KWMCarCountView.xib
+15
-7
KWMSearchBrandView.m
iCemarose/Class/UI/Brand/Cell/KWMSearchBrandView.m
+7
-12
KWMBrandCaramelVC.m
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
+5
-5
KWMBrandVC.m
iCemarose/Class/UI/Brand/KWMBrandVC.m
+5
-5
KWMSearchBrandVC.m
iCemarose/Class/UI/Brand/KWMSearchBrandVC.m
+3
-2
KWMCategoryTitleView.m
iCemarose/Class/UI/Category/Cell/KWMCategoryTitleView.m
+6
-8
KWMCategoryTitleView.xib
iCemarose/Class/UI/Category/Cell/KWMCategoryTitleView.xib
+5
-5
KWMCategoryVC.m
iCemarose/Class/UI/Category/KWMCategoryVC.m
+2
-1
Home.storyboard
iCemarose/Class/UI/Home/Home.storyboard
+8
-3
KWMBaseVC.h
iCemarose/Class/UI/KWMBaseVC.h
+1
-0
KWMBaseVC.m
iCemarose/Class/UI/KWMBaseVC.m
+10
-0
KWMMineTitleView.m
iCemarose/Class/UI/Mine/Cell/KWMMineTitleView.m
+7
-9
KWMMineTitleView.xib
iCemarose/Class/UI/Mine/Cell/KWMMineTitleView.xib
+12
-6
KWMMineVC.m
iCemarose/Class/UI/Mine/KWMMineVC.m
+3
-2
KWMOrderVC.m
iCemarose/Class/UI/Mine/KWMOrderVC.m
+3
-0
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+2
-1
NewProduct.storyboard
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
+21
-11
KWMSearchFeedBackView.m
iCemarose/Class/UI/Product/Cell/KWMSearchFeedBackView.m
+6
-13
KWMSearchFeedBackView.xib
iCemarose/Class/UI/Product/Cell/KWMSearchFeedBackView.xib
+11
-6
KWMSearchFeedbackVC.m
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
+7
-7
New.storyboard
iCemarose/Class/UI/Product/New.storyboard
+9
-9
KWMSearchBar.m
iCemarose/Class/View/KWMSearchBar.m
+6
-13
KWMSearchBar.xib
iCemarose/Class/View/KWMSearchBar.xib
+12
-7
No files found.
iCemarose/Base.lproj/Main.storyboard
View file @
a87f57fc
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/Brand/Brand.storyboard
View file @
a87f57fc
...
...
@@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
3
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
4
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
...
...
@@ -19,16 +19,16 @@
<objects>
<viewController
storyboardIdentifier=
"KWMBrandCaramelVC"
hidesBottomBarWhenPushed=
"YES"
useStoryboardIdentifierAsRestorationIdentifier=
"YES"
id=
"eiC-Xl-2es"
userLabel=
"品牌Caramel"
customClass=
"KWMBrandCaramelVC"
sceneMemberID=
"viewController"
>
<layoutGuides>
<viewControllerLayoutGuide
type=
"top"
id=
"
gML-uH-K3J
"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"
3n2-hH-xH7
"
/>
<viewControllerLayoutGuide
type=
"top"
id=
"
6iQ-dc-23W
"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"
HuL-FJ-3YQ
"
/>
</layoutGuides>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"zpX-41-Ngk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IcS-3H-XUB"
>
<tableView
c
lipsSubviews=
"YES"
c
ontentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IcS-3H-XUB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"94"
width=
"375"
height=
"573"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite
"
/>
<color
key=
"backgroundColor"
red=
"0.95686274509803915"
green=
"0.96078431372549022"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<view
key=
"tableHeaderView"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
id=
"m0g-lT-Bac"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"210"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
...
...
@@ -129,23 +129,23 @@
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"0.95686274509803915"
green=
"0.96078431372549022"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"IcS-3H-XUB"
secondAttribute=
"bottom"
id=
"0j4-ln-dzu"
/>
<constraint
firstItem=
"hDa-nl-Tlr"
firstAttribute=
"top"
secondItem=
"zpX-41-Ngk"
secondAttribute=
"top"
constant=
"64"
id=
"1ku-fw-1rl"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"evT-5t-rty"
secondAttribute=
"trailing"
id=
"67h-A6-5jJ"
/>
<constraint
firstItem=
"IcS-3H-XUB"
firstAttribute=
"leading"
secondItem=
"zpX-41-Ngk"
secondAttribute=
"leading"
id=
"CIl-uD-o0w"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"IcS-3H-XUB"
secondAttribute=
"trailing"
id=
"Cv2-YS-e4D"
/>
<constraint
firstItem=
"hDa-nl-Tlr"
firstAttribute=
"leading"
secondItem=
"zpX-41-Ngk"
secondAttribute=
"leading"
id=
"NhL-d5-aXA"
/>
<constraint
firstItem=
"evT-5t-rty"
firstAttribute=
"leading"
secondItem=
"zpX-41-Ngk"
secondAttribute=
"leading"
id=
"Og9-68-h35"
/>
<constraint
firstItem=
"
3n2-hH-xH7
"
firstAttribute=
"top"
secondItem=
"Cy8-TS-7aW"
secondAttribute=
"bottom"
id=
"PIf-9Z-uEf"
/>
<constraint
firstItem=
"
HuL-FJ-3YQ
"
firstAttribute=
"top"
secondItem=
"Cy8-TS-7aW"
secondAttribute=
"bottom"
id=
"PIf-9Z-uEf"
/>
<constraint
firstItem=
"IcS-3H-XUB"
firstAttribute=
"top"
secondItem=
"hDa-nl-Tlr"
secondAttribute=
"bottom"
id=
"VMa-R5-OFW"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"evT-5t-rty"
secondAttribute=
"bottom"
id=
"XDr-SL-NMM"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"hDa-nl-Tlr"
secondAttribute=
"trailing"
id=
"a3q-U2-mJY"
/>
<constraint
firstItem=
"evT-5t-rty"
firstAttribute=
"top"
secondItem=
"
gML-uH-K3J
"
secondAttribute=
"bottom"
id=
"cux-9w-CGx"
/>
<constraint
firstItem=
"evT-5t-rty"
firstAttribute=
"top"
secondItem=
"
6iQ-dc-23W
"
secondAttribute=
"bottom"
id=
"cux-9w-CGx"
/>
<constraint
firstItem=
"Cy8-TS-7aW"
firstAttribute=
"leading"
secondItem=
"zpX-41-Ngk"
secondAttribute=
"leading"
id=
"f5m-vf-b8j"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Cy8-TS-7aW"
secondAttribute=
"trailing"
id=
"iCF-U2-txU"
/>
<constraint
firstItem=
"Cy8-TS-7aW"
firstAttribute=
"top"
secondItem=
"hDa-nl-Tlr"
secondAttribute=
"bottom"
id=
"kzM-OO-4XA"
/>
<constraint
firstItem=
"3n2-hH-xH7"
firstAttribute=
"top"
secondItem=
"IcS-3H-XUB"
secondAttribute=
"bottom"
id=
"s35-CK-Hrw"
/>
</constraints>
</view>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
...
...
@@ -172,8 +172,8 @@
<objects>
<viewController
storyboardIdentifier=
"KWMSearchBrandVC"
hidesBottomBarWhenPushed=
"YES"
useStoryboardIdentifierAsRestorationIdentifier=
"YES"
id=
"dZB-o0-0V5"
userLabel=
"搜索品牌"
customClass=
"KWMSearchBrandVC"
sceneMemberID=
"viewController"
>
<layoutGuides>
<viewControllerLayoutGuide
type=
"top"
id=
"
BDj-Bc-fMI
"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"
ClW-aC-GMS
"
/>
<viewControllerLayoutGuide
type=
"top"
id=
"
H4N-xb-DN3
"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"
F3B-dM-7gE
"
/>
</layoutGuides>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"TAG-5I-k3z"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
...
...
@@ -209,15 +209,15 @@
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstItem=
"Tbn-TE-Ey2"
firstAttribute=
"top"
secondItem=
"
BDj-Bc-fMI
"
secondAttribute=
"bottom"
id=
"6Lb-UQ-GiU"
/>
<constraint
firstItem=
"Tbn-TE-Ey2"
firstAttribute=
"top"
secondItem=
"
H4N-xb-DN3
"
secondAttribute=
"bottom"
id=
"6Lb-UQ-GiU"
/>
<constraint
firstItem=
"Tbn-TE-Ey2"
firstAttribute=
"leading"
secondItem=
"TAG-5I-k3z"
secondAttribute=
"leading"
id=
"Bs0-Dh-YvD"
/>
<constraint
firstItem=
"Xga-IN-Pq4"
firstAttribute=
"leading"
secondItem=
"TAG-5I-k3z"
secondAttribute=
"leading"
id=
"C43-NT-I65"
/>
<constraint
firstItem=
"Xga-IN-Pq4"
firstAttribute=
"top"
secondItem=
"
TAG-5I-k3z"
secondAttribute=
"top"
constant=
"64"
id=
"HqX-43-hzC
"
/>
<constraint
firstItem=
"Xga-IN-Pq4"
firstAttribute=
"top"
secondItem=
"
H4N-xb-DN3"
secondAttribute=
"bottom"
constant=
"44"
id=
"KEJ-xt-Ywd
"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Tbn-TE-Ey2"
secondAttribute=
"trailing"
id=
"LP8-Zr-OcC"
/>
<constraint
firstItem=
"ClW-aC-GMS"
firstAttribute=
"top"
secondItem=
"gJI-aS-DRK"
secondAttribute=
"bottom"
id=
"PtC-MT-7E5"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Tbn-TE-Ey2"
secondAttribute=
"bottom"
id=
"TAb-Xe-bCR"
/>
<constraint
first
Item=
"gJI-aS-DRK"
firstAttribute=
"top"
secondItem=
"TAG-5I-k3z"
secondAttribute=
"top"
constant=
"65"
id=
"fjn-hj-Gb9
"
/>
<constraint
first
Attribute=
"bottom"
secondItem=
"gJI-aS-DRK"
secondAttribute=
"bottom"
id=
"WMI-Oz-4sQ
"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"gJI-aS-DRK"
secondAttribute=
"trailing"
id=
"gaI-ST-Scl"
/>
<constraint
firstItem=
"gJI-aS-DRK"
firstAttribute=
"top"
secondItem=
"H4N-xb-DN3"
secondAttribute=
"bottom"
constant=
"45"
id=
"h3X-zC-Xkm"
/>
<constraint
firstItem=
"gJI-aS-DRK"
firstAttribute=
"leading"
secondItem=
"TAG-5I-k3z"
secondAttribute=
"leading"
id=
"qiO-kD-Khu"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Xga-IN-Pq4"
secondAttribute=
"trailing"
id=
"tfA-Pe-mo6"
/>
</constraints>
...
...
iCemarose/Class/UI/Brand/Cell/KWMBarandSelectView.m
View file @
a87f57fc
...
...
@@ -13,13 +13,6 @@
BOOL
isShow
;
}
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initContentView
];
...
...
@@ -34,9 +27,10 @@
return
self
;
}
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
initContentView
];
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
-
(
void
)
initContentView
{
...
...
iCemarose/Class/UI/Brand/Cell/KWMBarandSelectView.xib
View file @
a87f57fc
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.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.XIB"
version=
"3.0"
toolsVersion=
"1
3196
"
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=
"1
2088
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3174
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Semibold
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMBarandSelectView"
>
<connections>
...
...
@@ -19,18 +24,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"zmX-9l-nYt"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"w07-X3-TZc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"I5b-cU-UJp"
/>
<constraint
firstAttribute=
"height"
id=
"I5b-cU-UJp"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LhU-hy-cgg"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"CAEAMEL"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"eLp-Fc-DGP"
>
<rect
key=
"frame"
x=
"50"
y=
"11"
width=
"78"
height=
"22"
/>
...
...
iCemarose/Class/UI/Brand/Cell/KWMCarCountView.m
View file @
a87f57fc
...
...
@@ -11,13 +11,6 @@
@implementation
KWMCarCountView
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initContentView
];
...
...
@@ -32,11 +25,6 @@
return
self
;
}
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
initContentView
];
}
-
(
void
)
initContentView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"KWMCarCountView"
owner
:
self
options
:
nil
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
...
...
@@ -57,6 +45,12 @@
}
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
-
(
IBAction
)
onClickShopCartBtn
:
(
id
)
sender
{
NSLog
(
@"点击了购物车"
);
if
(
self
.
delegate
!=
nil
)
{
...
...
iCemarose/Class/UI/Brand/Cell/KWMCarCountView.xib
View file @
a87f57fc
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.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.XIB"
version=
"3.0"
toolsVersion=
"1
3196
"
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=
"1
2088
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3174
"
/>
<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-Regular
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMCarCountView"
>
<connections>
...
...
@@ -18,18 +26,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"R6r-bc-k21"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"jaQ-9K-pwB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"1db-NU-cyT"
/>
<constraint
firstAttribute=
"height"
id=
"1db-NU-cyT"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"k5I-0u-ww6"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"oya-px-46r"
>
<rect
key=
"frame"
x=
"321"
y=
"0.0"
width=
"44"
height=
"44"
/>
...
...
@@ -91,7 +99,7 @@
<constraint
firstItem=
"k5I-0u-ww6"
firstAttribute=
"leading"
secondItem=
"R6r-bc-k21"
secondAttribute=
"leading"
id=
"U7I-TN-ssU"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"jaQ-9K-pwB"
secondAttribute=
"trailing"
id=
"fSY-DF-L1l"
/>
<constraint
firstItem=
"jaQ-9K-pwB"
firstAttribute=
"leading"
secondItem=
"R6r-bc-k21"
secondAttribute=
"leading"
id=
"vmB-14-aYa"
/>
<constraint
firstItem=
"k5I-0u-ww6"
firstAttribute=
"top"
secondItem=
"R6r-bc-k21"
secondAttribute=
"top"
constant=
"20"
id=
"wrG-1M-LtJ"
/>
<constraint
firstItem=
"k5I-0u-ww6"
firstAttribute=
"top"
secondItem=
"R6r-bc-k21"
secondAttribute=
"top"
id=
"wrG-1M-LtJ"
/>
<constraint
firstItem=
"jaQ-9K-pwB"
firstAttribute=
"top"
secondItem=
"R6r-bc-k21"
secondAttribute=
"top"
id=
"zeW-XB-RBH"
/>
</constraints>
<nil
key=
"simulatedStatusBarMetrics"
/>
...
...
iCemarose/Class/UI/Brand/Cell/KWMSearchBrandView.m
View file @
a87f57fc
...
...
@@ -12,13 +12,6 @@
BOOL
isSearching
;
}
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initContentView
];
...
...
@@ -33,11 +26,6 @@
return
self
;
}
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
initContentView
];
}
-
(
void
)
initContentView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"KWMSearchBrandView"
owner
:
self
options
:
nil
];
[
self
addSubview
:
_vContent
];
...
...
@@ -47,6 +35,13 @@
self
.
tfBrand
.
returnKeyType
=
UIReturnKeySearch
;
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
-
(
void
)
startAnimate
{
if
(
isSearching
)
{
//搜索状态
self
.
brandLeft
.
constant
=
22
+
10
+
71
-
UI_SCREEN_WIDTH
;
...
...
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
View file @
a87f57fc
...
...
@@ -114,12 +114,12 @@
-
(
void
)
initHeaderView
{
_barandSelectView
=
[[
KWMBarandSelectView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
64
)
];
_
barandSelectView
.
count
=
[[
KWMShoppingCart
sharedInstance
]
count
].
integerValue
;
_
barandSelectView
.
lbBrand
.
text
=
[
_brand
uppercaseString
];
self
.
barandSelectView
=
[[
KWMBarandSelectView
alloc
]
init
];
self
.
barandSelectView
.
count
=
[[
KWMShoppingCart
sharedInstance
]
count
].
integerValue
;
self
.
barandSelectView
.
lbBrand
.
text
=
[
_brand
uppercaseString
];
self
.
barandSelectView
.
delegate
=
self
;
[
self
.
view
addSubview
:
_barandSelectView
];
_barandSelectView
.
delegate
=
self
;
[
self
initCustomTitleBarConstarints
:
self
.
barandSelectView
]
;
}
static
NSString
*
idStr
=
@"KWMBrandCaramelCell"
;
...
...
iCemarose/Class/UI/Brand/KWMBrandVC.m
View file @
a87f57fc
...
...
@@ -84,10 +84,11 @@ static NSString *cellId = @"KWMBrandCell";
}
-
(
void
)
initHeardView
{
_vCartCount
=
[[
KWMCarCountView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
64
)];
_vCartCount
.
count
=
[[
KWMShoppingCart
sharedInstance
]
count
].
integerValue
;
_vCartCount
.
delegate
=
self
;
[
self
.
view
addSubview
:
_vCartCount
];
self
.
vCartCount
=
[[
KWMCarCountView
alloc
]
init
];
self
.
vCartCount
.
count
=
[[
KWMShoppingCart
sharedInstance
]
count
].
integerValue
;
self
.
vCartCount
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
vCartCount
];
[
self
initCustomTitleBarConstarints
:
self
.
vCartCount
];
}
-
(
void
)
initBrandNameAndImage
{
...
...
@@ -114,7 +115,6 @@ static NSString *cellId = @"KWMBrandCell";
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
self
.
title
=
@"品牌"
;
}
-
(
void
)
onClickMoreBrand
:
(
id
)
sender
{
...
...
iCemarose/Class/UI/Brand/KWMSearchBrandVC.m
View file @
a87f57fc
...
...
@@ -67,9 +67,10 @@
}
-
(
void
)
initHeaderView
{
_searchBrandView
=
[[
KWMSearchBrandView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
20
,
UI_SCREEN_WIDTH
,
44
)
];
self
.
searchBrandView
=
[[
KWMSearchBrandView
alloc
]
init
];
[
self
.
view
addSubview
:
_searchBrandView
];
_searchBrandView
.
delegate
=
self
;
self
.
searchBrandView
.
delegate
=
self
;
[
self
initCustomTitleBarConstarints
:
self
.
searchBrandView
];
}
static
NSString
*
identify
=
@"KWMSearchBrandsCell"
;
...
...
iCemarose/Class/UI/Category/Cell/KWMCategoryTitleView.m
View file @
a87f57fc
...
...
@@ -21,13 +21,6 @@
@implementation
KWMCategoryTitleView
-
(
id
)
init
{
if
(
self
=
[
super
init
]){
[
self
addView
];
}
return
self
;
}
-
(
id
)
initWithCoder
:(
NSCoder
*
)
aDecoder
{
self
=
[
super
initWithCoder
:
aDecoder
];
if
(
self
)
{
...
...
@@ -45,7 +38,6 @@
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
addView
];
}
-
(
void
)
addView
{
...
...
@@ -62,6 +54,12 @@
[
self
.
vSearchBar
setBorder
:
0
cornerRadius
:
2
borderColor
:
nil
];
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
-
(
void
)
setCount
:
(
NSNumber
*
)
count
{
_count
=
count
;
self
.
lbCount
.
text
=
count
.
stringValue
;
...
...
iCemarose/Class/UI/Category/Cell/KWMCategoryTitleView.xib
View file @
a87f57fc
...
...
@@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
3
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
4
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
...
...
@@ -23,18 +23,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hKF-vD-6Tp"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"fZ2-lU-6fn"
/>
<constraint
firstAttribute=
"height"
id=
"fZ2-lU-6fn"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"fl4-ro-VaX"
userLabel=
"vContent"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7Cc-is-gm9"
userLabel=
"btn_shop_cart"
>
<rect
key=
"frame"
x=
"321"
y=
"0.0"
width=
"44"
height=
"44"
/>
...
...
iCemarose/Class/UI/Category/KWMCategoryVC.m
View file @
a87f57fc
...
...
@@ -152,10 +152,11 @@
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
NSNumber
*
count
=
[[
KWMShoppingCart
sharedInstance
]
count
];
self
.
titleView
=
[[
KWMCategoryTitleView
alloc
]
init
WithFrame
:
CGRectMake
(
0
,
0
,
self
.
view
.
frame
.
size
.
width
,
64
)
];
self
.
titleView
=
[[
KWMCategoryTitleView
alloc
]
init
];
self
.
titleView
.
delegate
=
self
;
self
.
titleView
.
count
=
count
;
[
self
.
view
addSubview
:
self
.
titleView
];
[
self
initCustomTitleBarConstarints
:
self
.
titleView
];
}
#pragma mark -- KWMCategoryTitleDelegate
...
...
iCemarose/Class/UI/Home/Home.storyboard
View file @
a87f57fc
<?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"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
2088
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
3174
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Regular
</string>
</array>
</customFonts>
<scenes>
<!--博客详情-->
<scene
sceneID=
"DWf-pX-AYa"
>
...
...
@@ -78,8 +83,8 @@
<constraints>
<constraint
firstItem=
"XdN-GP-LIS"
firstAttribute=
"leading"
secondItem=
"k5a-vQ-s85"
secondAttribute=
"leading"
id=
"NJ9-VE-w3D"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"XdN-GP-LIS"
secondAttribute=
"trailing"
id=
"Urr-pn-Jrq"
/>
<constraint
firstItem=
"rO7-Am-QA1"
firstAttribute=
"top"
secondItem=
"XdN-GP-LIS"
secondAttribute=
"bottom"
id=
"ajN-GQ-ChV"
/>
<constraint
firstItem=
"XdN-GP-LIS"
firstAttribute=
"top"
secondItem=
"5PW-Pq-dm1"
secondAttribute=
"bottom"
id=
"iH1-hu-dA8"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"XdN-GP-LIS"
secondAttribute=
"bottom"
id=
"kAG-NR-E8J"
/>
</constraints>
</view>
<connections>
...
...
iCemarose/Class/UI/KWMBaseVC.h
View file @
a87f57fc
...
...
@@ -60,6 +60,7 @@
-
(
void
)
keyboardWillHide
:(
NSNotification
*
)
notification
;
-
(
void
)
keyboardWillShow
:(
NSNotification
*
)
notification
;
-
(
void
)
keyboardWillChangeFrame
:(
NSNotification
*
)
notification
;
-
(
void
)
initCustomTitleBarConstarints
:(
UIView
*
)
titleView
;
-
(
UIBarButtonItem
*
)
createBarButtonItem
:(
NSString
*
)
title
image
:(
UIImage
*
)
image
action
:(
SEL
)
action
;
...
...
iCemarose/Class/UI/KWMBaseVC.m
View file @
a87f57fc
...
...
@@ -301,6 +301,16 @@
NSAssert
(
NO
,
@"调用尚未实现的方法"
);
}
-
(
void
)
initCustomTitleBarConstarints
:
(
UIView
*
)
titleView
{
id
mTopLayoutGuide
=
self
.
topLayoutGuide
;
// 使用autoLayout约束,禁止将AutoresizingMask转换为约束
[
titleView
setTranslatesAutoresizingMaskIntoConstraints
:
NO
];
NSDictionary
*
views
=
NSDictionaryOfVariableBindings
(
titleView
);
NSDictionary
*
views2
=
NSDictionaryOfVariableBindings
(
titleView
,
mTopLayoutGuide
);
[
self
.
view
addConstraints
:
[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"H:|[titleView]|"
options
:
0
metrics
:
nil
views
:
views
]];
[
self
.
view
addConstraints
:[
NSLayoutConstraint
constraintsWithVisualFormat
:
@"V:|[mTopLayoutGuide]-0-[titleView(44.0)]"
options
:
0
metrics
:
nil
views
:
views2
]];
}
-
(
BOOL
)
checkLogin
{
KWMUserModel
*
user
=
[
KWMUserModel
shareUser
];
if
(
user
.
status
!=
1
)
{
...
...
iCemarose/Class/UI/Mine/Cell/KWMMineTitleView.m
View file @
a87f57fc
...
...
@@ -10,19 +10,13 @@
@implementation
KWMMineTitleView
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithCoder
:(
NSCoder
*
)
aDecoder
{
if
(
self
=
[
super
initWithCoder
:
aDecoder
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initContentView
];
...
...
@@ -32,9 +26,13 @@
-
(
void
)
initContentView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"KWMMineTitleView"
owner
:
self
options
:
nil
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
[
self
addSubview
:
_vContent
];
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
@end
iCemarose/Class/UI/Mine/Cell/KWMMineTitleView.xib
View file @
a87f57fc
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1
1542"
systemVersion=
"16A323
"
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"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
152
4"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
317
4"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Light
</string>
<string>
PingFangSC-Medium
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMMineTitleView"
>
<connections>
...
...
@@ -18,18 +24,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"BgZ-g4-beh"
userLabel=
"vContent"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Bel-fl-SfK"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"NY3-Oh-oda"
/>
<constraint
firstAttribute=
"height"
id=
"NY3-Oh-oda"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"6KD-73-iA6"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"我的"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YAC-CC-nAy"
>
<rect
key=
"frame"
x=
"175.5"
y=
"0.0"
width=
"24"
height=
"22"
/>
...
...
iCemarose/Class/UI/Mine/KWMMineVC.m
View file @
a87f57fc
...
...
@@ -60,7 +60,8 @@
}
-
(
void
)
initHeaderView
{
_vTitle
=
[[
KWMMineTitleView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
64
)];
_vTitle
=
[[
KWMMineTitleView
alloc
]
init
];
// _vTitle = [[KWMMineTitleView alloc] initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 64)];
_vTitle
.
lbUserName
.
text
=
_user
.
status
?
_user
.
name
:
@"未登录"
;
if
(
_user
.
status
==
1
)
{
[
self
.
btnLogin
setTitle
:
@"退出"
forState
:
UIControlStateNormal
];
...
...
@@ -70,7 +71,7 @@
[
self
.
btnLogin
setImage
:[
UIImage
imageNamed
:
@"button_mine_login"
]
forState
:
UIControlStateNormal
];
}
[
self
.
view
addSubview
:
_vTitle
];
[
self
initCustomTitleBarConstarints
:
_vTitle
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
iCemarose/Class/UI/Mine/KWMOrderVC.m
View file @
a87f57fc
...
...
@@ -187,6 +187,9 @@
self
.
client
.
customerToken
=
[
BUYCustomerToken
customerTokenWithJSONDictionary
:[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"token"
]];
[
self
.
client
getOrdersForCustomerCallback
:
^
(
NSArray
<
BUYOrder
*>
*
_Nullable
orders
,
NSError
*
_Nullable
error
)
{
for
(
int
i
=
0
;
i
<
orders
.
count
;
i
++
)
{
NSLog
(
@"langArray[%d]=%@"
,
i
,
orders
[
i
].
JSONDictionary
);
}
[
weakSelf
hideLoading
];
if
(
error
==
nil
&&
orders
!=
nil
)
{
[
weakSelf
.
orderList
removeAllObjects
];
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
a87f57fc
...
...
@@ -114,10 +114,11 @@ typedef enum{
}
-
(
void
)
initTitleView
{
self
.
titleView
=
[[
KWMSearchBar
alloc
]
init
WithFrame
:
CGRectMake
(
0
,
0
,
self
.
view
.
frame
.
size
.
width
,
64
)
];
self
.
titleView
=
[[
KWMSearchBar
alloc
]
init
];
self
.
titleView
.
delegate
=
self
;
self
.
titleView
.
btnSearch
.
hidden
=
NO
;
[
self
.
view
addSubview
:
self
.
titleView
];
[
self
initCustomTitleBarConstarints
:
self
.
titleView
];
}
-
(
void
)
initCollectionView
{
...
...
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
View file @
a87f57fc
...
...
@@ -151,12 +151,32 @@
<action
selector=
"onClickShopCart:"
destination=
"Vzq-D6-e57"
eventType=
"touchUpInside"
id=
"rOf-cw-IRH"
/>
</connections>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Jxc-tQ-Uvl"
userLabel=
"line"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"80"
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=
"dEf-Kf-tOU"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"SsT-tp-tcA"
userLabel=
"line"
>
<rect
key=
"frame"
x=
"0.0"
y=
"49"
width=
"80"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.84705882349999995"
green=
"0.85882352939999995"
blue=
"0.87058823529999996"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"8D1-12-8eD"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"80"
id=
"0qC-Tw-VN0"
/>
<constraint
firstItem=
"Jxc-tQ-Uvl"
firstAttribute=
"top"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"top"
id=
"5BL-i2-XEO"
/>
<constraint
firstItem=
"Jxc-tQ-Uvl"
firstAttribute=
"leading"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"leading"
id=
"EXa-s5-aZV"
/>
<constraint
firstItem=
"SsT-tp-tcA"
firstAttribute=
"leading"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"leading"
id=
"Im8-La-slV"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"SsT-tp-tcA"
secondAttribute=
"bottom"
id=
"Y16-zp-sdL"
/>
<constraint
firstItem=
"gbx-rg-A8B"
firstAttribute=
"centerX"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"centerX"
id=
"fWx-g7-oy7"
/>
<constraint
firstItem=
"gbx-rg-A8B"
firstAttribute=
"centerY"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"centerY"
id=
"fet-ki-2vJ"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Jxc-tQ-Uvl"
secondAttribute=
"trailing"
id=
"kHN-ud-ZhE"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"SsT-tp-tcA"
secondAttribute=
"trailing"
id=
"w8n-Bj-0GH"
/>
</constraints>
</view>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YFr-wz-mgl"
>
...
...
@@ -181,22 +201,12 @@
<action
selector=
"onClickComplete:"
destination=
"Vzq-D6-e57"
eventType=
"touchUpInside"
id=
"tO6-dz-eNt"
/>
</connections>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Jxc-tQ-Uvl"
userLabel=
"line"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
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=
"dEf-Kf-tOU"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"p6D-hx-qVB"
firstAttribute=
"leading"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"leading"
id=
"9CF-cd-J2w"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"oPf-c2-z7n"
secondAttribute=
"trailing"
id=
"Iie-17-jiS"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Jxc-tQ-Uvl"
secondAttribute=
"trailing"
id=
"KMf-E2-2Eb"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"oPf-c2-z7n"
secondAttribute=
"bottom"
id=
"QCf-h9-wdW"
/>
<constraint
firstItem=
"Jxc-tQ-Uvl"
firstAttribute=
"leading"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"leading"
id=
"RKe-Wt-6Io"
/>
<constraint
firstItem=
"Jxc-tQ-Uvl"
firstAttribute=
"top"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"top"
id=
"UAc-9x-8KP"
/>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"WhH-yK-gHq"
/>
<constraint
firstItem=
"YFr-wz-mgl"
firstAttribute=
"leading"
secondItem=
"p6D-hx-qVB"
secondAttribute=
"trailing"
id=
"Z0o-FF-rB3"
/>
<constraint
firstItem=
"p6D-hx-qVB"
firstAttribute=
"top"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"top"
id=
"fu6-hx-f4P"
/>
...
...
@@ -214,9 +224,9 @@
<constraint
firstAttribute=
"trailing"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"trailing"
id=
"2B4-2I-dss"
/>
<constraint
firstItem=
"kgb-zB-eBa"
firstAttribute=
"top"
secondItem=
"Pjy-Ny-sa9"
secondAttribute=
"bottom"
id=
"3J0-tF-Mna"
/>
<constraint
firstItem=
"aqB-2y-BKU"
firstAttribute=
"leading"
secondItem=
"IxM-8o-F8K"
secondAttribute=
"leading"
id=
"6I6-ul-bGF"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"bottom"
id=
"97w-S0-S0x"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"T6J-Gp-5iu"
secondAttribute=
"trailing"
id=
"B5K-Fj-FOR"
/>
<constraint
firstItem=
"T6J-Gp-5iu"
firstAttribute=
"leading"
secondItem=
"IxM-8o-F8K"
secondAttribute=
"leading"
id=
"DZE-DY-3SX"
/>
<constraint
firstItem=
"5rs-FM-Imo"
firstAttribute=
"top"
secondItem=
"aqB-2y-BKU"
secondAttribute=
"bottom"
id=
"Dag-cY-cd9"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"kgb-zB-eBa"
secondAttribute=
"trailing"
id=
"FyY-BZ-73X"
/>
<constraint
firstItem=
"kgb-zB-eBa"
firstAttribute=
"leading"
secondItem=
"IxM-8o-F8K"
secondAttribute=
"leading"
id=
"KfD-qL-WSj"
/>
<constraint
firstItem=
"aqB-2y-BKU"
firstAttribute=
"top"
secondItem=
"T6J-Gp-5iu"
secondAttribute=
"bottom"
id=
"kEG-am-iPo"
/>
...
...
iCemarose/Class/UI/Product/Cell/KWMSearchFeedBackView.m
View file @
a87f57fc
...
...
@@ -10,13 +10,6 @@
@implementation
KWMSearchFeedBackView
-
(
instancetype
)
init
{
if
(
self
=
[
super
init
])
{
[
self
initContentView
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
...
...
@@ -33,16 +26,10 @@
return
self
;
}
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
initContentView
];
}
-
(
void
)
initContentView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"KWMSearchFeedBackView"
owner
:
self
options
:
nil
];
[
self
addSubview
:
self
.
vContent
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
self
.
lbGoodsNum
.
hidden
=
YES
;
}
-
(
IBAction
)
onClickSearchBtn
:
(
id
)
sender
{
...
...
@@ -57,6 +44,12 @@
}
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vContent
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
#pragma mark -- UITextFieldDelegate
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
NSString
*
string
=
textField
.
text
;
...
...
iCemarose/Class/UI/Product/Cell/KWMSearchFeedBackView.xib
View file @
a87f57fc
<?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"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
152
4"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
317
4"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Light
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMSearchFeedBackView"
>
<connections>
...
...
@@ -20,18 +25,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"kdr-EL-mmm"
userLabel=
"vContent"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vky-bm-ecy"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"Rip-Uy-a7h"
/>
<constraint
firstAttribute=
"height"
id=
"Rip-Uy-a7h"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9Qs-Qo-CtH"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Ggn-e9-wbW"
>
<rect
key=
"frame"
x=
"10"
y=
"11"
width=
"22"
height=
"22"
/>
...
...
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
View file @
a87f57fc
...
...
@@ -79,13 +79,13 @@ static NSString *idStr = @"KWMBrandCaramelCell";
}
-
(
void
)
initHeardView
{
_vSearchFB
=
[[
KWMSearchFeedBackView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
64
)]
;
_vSearchFB
.
tfSearch
.
text
=
self
.
searchText
;
_vSearchFB
.
lbGoodsNum
.
hidden
=
NO
;
_vSearchFB
.
lbGoodsNum
.
text
=
[
NSString
stringWithFormat
:
@"%lu商品"
,(
unsigned
long
)
total
]
;
_vSearchFB
.
delegate
=
self
;
[
self
.
view
addSubview
:
_
vSearchFB
];
self
.
vSearchFB
=
[[
KWMSearchFeedBackView
alloc
]
init
];
self
.
vSearchFB
.
tfSearch
.
text
=
self
.
searchText
;
self
.
vSearchFB
.
lbGoodsNum
.
hidden
=
NO
;
self
.
vSearchFB
.
lbGoodsNum
.
text
=
[
NSString
stringWithFormat
:
@"%lu商品"
,(
unsigned
long
)
total
]
;
self
.
vSearchFB
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
vSearchFB
]
;
[
self
initCustomTitleBarConstarints
:
self
.
vSearchFB
];
}
#pragma mark -- KWMBrandCaramelCellDelegate
...
...
iCemarose/Class/UI/Product/New.storyboard
View file @
a87f57fc
...
...
@@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
3
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
4
"
/>
<capability
name=
"Constraints to layout margins"
minToolsVersion=
"6.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
...
...
@@ -251,10 +251,10 @@
</connections>
</tableView>
<view
hidden=
"YES"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"wbB-ey-Zag"
userLabel=
"vNoGoods"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.0"
width=
"375"
height=
"66
7"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
20"
width=
"375"
height=
"64
7"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"暂无商品"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"fNr-vb-Qf7"
>
<rect
key=
"frame"
x=
"154.5"
y=
"3
2
3"
width=
"66"
height=
"21"
/>
<rect
key=
"frame"
x=
"154.5"
y=
"3
1
3"
width=
"66"
height=
"21"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"66"
id=
"nfp-BN-Tdh"
/>
<constraint
firstAttribute=
"height"
constant=
"21"
id=
"wU7-LY-bkV"
/>
...
...
@@ -264,7 +264,7 @@
<nil
key=
"highlightedColor"
/>
</label>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"ic_brand_not quite available"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"CVd-db-6Nq"
>
<rect
key=
"frame"
x=
"168.5"
y=
"2
6
2"
width=
"38"
height=
"43"
/>
<rect
key=
"frame"
x=
"168.5"
y=
"2
5
2"
width=
"38"
height=
"43"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"43"
id=
"QB8-O7-9hQ"
/>
<constraint
firstAttribute=
"width"
constant=
"37.530000000000001"
id=
"hdJ-uX-QNB"
/>
...
...
@@ -280,22 +280,22 @@
</constraints>
</view>
<view
hidden=
"YES"
alpha=
"0.59999999999999998"
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"0gx-v6-eAP"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.0"
width=
"375"
height=
"66
7"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
20"
width=
"375"
height=
"64
7"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstItem=
"wbB-ey-Zag"
firstAttribute=
"top"
secondItem=
"YH1-IF-LTL"
secondAttribute=
"bottom"
id=
"B2o-AQ-KaO"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"0gx-v6-eAP"
secondAttribute=
"bottom"
id=
"JWf-1t-OhT"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Fmw-OX-y1u"
secondAttribute=
"bottom"
id=
"KDQ-E4-wkV"
/>
<constraint
firstItem=
"
taY-Y0-CRF"
firstAttribute=
"top"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"top"
constant=
"64"
id=
"O4E-7c-QiS
"
/>
<constraint
firstItem=
"
0gx-v6-eAP"
firstAttribute=
"top"
secondItem=
"YH1-IF-LTL"
secondAttribute=
"bottom"
id=
"N4t-V3-Lgo
"
/>
<constraint
firstItem=
"taY-Y0-CRF"
firstAttribute=
"leading"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"leading"
id=
"QND-SZ-tAr"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"wbB-ey-Zag"
secondAttribute=
"trailing"
id=
"QVg-n3-hOZ"
/>
<constraint
firstItem=
"Fmw-OX-y1u"
firstAttribute=
"top"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"top"
constant=
"65"
id=
"XBY-zg-a9u"
/>
<constraint
firstItem=
"wbB-ey-Zag"
firstAttribute=
"top"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"top"
id=
"ZQ3-kW-slY"
/>
<constraint
firstItem=
"taY-Y0-CRF"
firstAttribute=
"top"
secondItem=
"YH1-IF-LTL"
secondAttribute=
"bottom"
constant=
"44"
id=
"Tf5-pk-8Wd"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"taY-Y0-CRF"
secondAttribute=
"trailing"
id=
"aew-aA-WyS"
/>
<constraint
firstItem=
"0gx-v6-eAP"
firstAttribute=
"top"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"top"
id=
"dO9-sW-Trm"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"0gx-v6-eAP"
secondAttribute=
"trailing"
id=
"fII-UN-CCe"
/>
<constraint
firstItem=
"Fmw-OX-y1u"
firstAttribute=
"top"
secondItem=
"taY-Y0-CRF"
secondAttribute=
"bottom"
id=
"fbc-Mp-VjF"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"wbB-ey-Zag"
secondAttribute=
"bottom"
id=
"iRq-ft-rl5"
/>
<constraint
firstItem=
"Fmw-OX-y1u"
firstAttribute=
"top"
secondItem=
"YH1-IF-LTL"
secondAttribute=
"bottom"
constant=
"-20"
id=
"kf6-GV-ebU"
/>
<constraint
firstItem=
"Fmw-OX-y1u"
firstAttribute=
"leading"
secondItem=
"GXA-CG-nHY"
secondAttribute=
"leading"
id=
"pet-Wg-LZs"
/>
...
...
iCemarose/Class/View/KWMSearchBar.m
View file @
a87f57fc
...
...
@@ -11,13 +11,6 @@
@implementation
KWMSearchBar
-
(
id
)
init
{
if
(
self
=
[
super
init
]){
[
self
addView
];
}
return
self
;
}
-
(
id
)
initWithCoder
:(
NSCoder
*
)
aDecoder
{
self
=
[
super
initWithCoder
:
aDecoder
];
if
(
self
)
{
...
...
@@ -33,17 +26,11 @@
return
self
;
}
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
addView
];
}
-
(
void
)
addView
{
[[
NSBundle
mainBundle
]
loadNibNamed
:
NSStringFromClass
([
self
class
])
owner
:
self
options
:
nil
];
self
.
vView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
[
self
addSubview
:
self
.
vView
];
[
self
.
vCount
setUserInteractionEnabled
:
NO
];
[
self
.
lbCount
setUserInteractionEnabled
:
NO
];
...
...
@@ -53,6 +40,12 @@
[
self
initView
];
}
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
self
.
vView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
);
}
-
(
void
)
setCount
:
(
NSInteger
)
count
{
_count
=
count
;
if
(
count
>
0
)
{
...
...
iCemarose/Class/View/KWMSearchBar.xib
View file @
a87f57fc
<?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"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
152
4"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
317
4"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<customFonts
key=
"customFonts"
>
<array
key=
"PingFang.ttc"
>
<string>
PingFangSC-Light
</string>
</array>
</customFonts>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMSearchBar"
>
<connections>
...
...
@@ -25,18 +30,18 @@
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
6
4"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
4
4"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"DoM-T9-tzd"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
2
0"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
0.
0"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"20"
id=
"tcd-zY-CfJ"
/>
<constraint
firstAttribute=
"height"
id=
"tcd-zY-CfJ"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"9Fg-do-aH3"
userLabel=
"vContent"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
2
0"
width=
"375"
height=
"44"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.
0"
width=
"375"
height=
"44"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"im_logo"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"GA3-Mh-Bf7"
>
<rect
key=
"frame"
x=
"20"
y=
"10"
width=
"135"
height=
"24"
/>
...
...
@@ -136,7 +141,7 @@
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"9Fg-do-aH3"
secondAttribute=
"bottom"
id=
"Irf-Eu-HZz"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"9Fg-do-aH3"
secondAttribute=
"trailing"
id=
"WiV-9o-qew"
/>
<constraint
firstItem=
"9Fg-do-aH3"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
constant=
"20"
id=
"ZKG-cY-8cO"
/>
<constraint
firstItem=
"9Fg-do-aH3"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"ZKG-cY-8cO"
/>
<constraint
firstItem=
"DoM-T9-tzd"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"hlY-pE-sYP"
/>
<constraint
firstItem=
"DoM-T9-tzd"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"iMh-jN-7jR"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"DoM-T9-tzd"
secondAttribute=
"trailing"
id=
"iwr-FN-dhi"
/>
...
...
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