Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
万
万科
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
万科
Commits
2fad88d4
Commit
2fad88d4
authored
Apr 19, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择店铺界面搭建完成
parent
dcf6e089
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
267 additions
and
18 deletions
+267
-18
project.pbxproj
vanke.xcodeproj/project.pbxproj
+6
-0
VankeAffairsBoard_iPhone.m
.../view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
+4
-3
ChooseShopViewController.h
...emplates/salesInput/Controller/ChooseShopViewController.h
+14
-0
ChooseShopViewController.m
...emplates/salesInput/Controller/ChooseShopViewController.m
+99
-0
HistoryViewController.m
...e/templates/salesInput/Controller/HistoryViewController.m
+67
-12
SalesInputViewController.m
...emplates/salesInput/Controller/SalesInputViewController.m
+51
-0
SalesInputTopView.h
...view_iPhone/templates/salesInput/View/SalesInputTopView.h
+3
-1
SalesInputTopView.m
...view_iPhone/templates/salesInput/View/SalesInputTopView.m
+13
-0
SalesInputTopView.xib
...ew_iPhone/templates/salesInput/View/SalesInputTopView.xib
+10
-2
No files found.
vanke.xcodeproj/project.pbxproj
View file @
2fad88d4
...
...
@@ -7,6 +7,7 @@
objects
=
{
/* Begin PBXBuildFile section */
19000E721CC5DA7600DF8D71
/* ChooseShopViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19000E711CC5DA7600DF8D71
/* ChooseShopViewController.m */
;
};
1928FD021CC487A10077BE34
/* SalesInputViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1928FCFC1CC487A10077BE34
/* SalesInputViewController.m */
;
};
1928FD031CC487A10077BE34
/* SalesInputTopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1928FD001CC487A10077BE34
/* SalesInputTopView.m */
;
};
1928FD041CC487A10077BE34
/* SalesInputTopView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1928FD011CC487A10077BE34
/* SalesInputTopView.xib */
;
};
...
...
@@ -714,6 +715,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
19000E701CC5DA7600DF8D71
/* ChooseShopViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChooseShopViewController.h
;
sourceTree
=
"<group>"
;
};
19000E711CC5DA7600DF8D71
/* ChooseShopViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChooseShopViewController.m
;
sourceTree
=
"<group>"
;
};
1928FCFB1CC487A10077BE34
/* SalesInputViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SalesInputViewController.h
;
sourceTree
=
"<group>"
;
};
1928FCFC1CC487A10077BE34
/* SalesInputViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SalesInputViewController.m
;
sourceTree
=
"<group>"
;
};
1928FCFF1CC487A10077BE34
/* SalesInputTopView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SalesInputTopView.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1973,6 +1976,8 @@
1928FCFC1CC487A10077BE34
/* SalesInputViewController.m */
,
1928FD0A1CC4C59E0077BE34
/* HistoryViewController.h */
,
1928FD0B1CC4C59E0077BE34
/* HistoryViewController.m */
,
19000E701CC5DA7600DF8D71
/* ChooseShopViewController.h */
,
19000E711CC5DA7600DF8D71
/* ChooseShopViewController.m */
,
);
path
=
Controller
;
sourceTree
=
"<group>"
;
...
...
@@ -4671,6 +4676,7 @@
C1D5992C1BB44B2100D297FE
/* Bee_MYSQL.m in Sources */
,
C10F183A1BF7ACA80065F18C
/* IBTCommon.m in Sources */
,
C1E0AD7C1C12FC7200DE6BB9
/* SRMonthPicker.m in Sources */
,
19000E721CC5DA7600DF8D71
/* ChooseShopViewController.m in Sources */
,
C1D599831BB44B2100D297FE
/* CXMLDocument.m in Sources */
,
C1D598FE1BB44B2000D297FE
/* Bee_UITransitionFade.m in Sources */
,
C1D599801BB44B2100D297FE
/* Reachability.m in Sources */
,
...
...
vanke/view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
View file @
2fad88d4
...
...
@@ -30,6 +30,7 @@
{
//<#@private var#>
NSArray
*
authorizedOrgs
;
UIImage
*
navibarImage
;
}
@end
...
...
@@ -69,6 +70,8 @@ ON_LAYOUT_VIEWS( signal )
ON_WILL_APPEAR
(
signal
)
{
self
.
navigationController
.
navigationBar
.
backgroundImage
=
[
UIImage
imageWithColor
:[
UIColor
colorWithRed
:
0
.
929
green
:
0
.
106
blue
:
0
.
137
alpha
:
1
.
000
]];
UIColor
*
color
=
[
VankeUtil
rgbStringToColor
:
@"237,27,35"
];
if
(
IOS7_OR_LATER
)
{
self
.
navigationController
.
navigationBar
.
barTintColor
=
color
;
...
...
@@ -124,10 +127,8 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
ON_SIGNAL3
(
VankeAffairsBoard_iPhone
,
btnSaleInput
,
signal
)
{
SalesInputViewController
*
salesVC
=
[[
SalesInputViewController
alloc
]
init
];
// SalesInputViewController *salesVC = [SalesInputViewController board];
// [self.stack pushBoard:salesVC animated:YES];
// [salesVC setHidesBottomBarWhenPushed:YES];
[
self
.
navigationController
pushViewController
:
salesVC
animated
:
YES
];
//[GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f];
}
...
...
vanke/view_iPhone/templates/salesInput/Controller/ChooseShopViewController.h
0 → 100644
View file @
2fad88d4
//
// ChooseShopViewController.h
// vanke
//
// Created by Z on 16/4/19.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef
void
(
^
block
)(
NSString
*
);
@interface
ChooseShopViewController
:
UIViewController
@property
(
nonatomic
,
copy
)
block
chooseBlock
;
@end
vanke/view_iPhone/templates/salesInput/Controller/ChooseShopViewController.m
0 → 100644
View file @
2fad88d4
//
// ChooseShopViewController.m
// vanke
//
// Created by Z on 16/4/19.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "ChooseShopViewController.h"
#import "UIImage+Helper.h"
#define kCellId @"searchCell"
@interface
ChooseShopViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UISearchBarDelegate
>
@property
(
nonatomic
,
strong
)
UISearchBar
*
searchBar
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
copy
)
NSString
*
searchText
;
@end
@implementation
ChooseShopViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"选择商铺"
;
[
self
setUPSearchBar
];
[
self
setUpTableView
];
// Do any additional setup after loading the view.
}
-
(
void
)
setUPSearchBar
{
self
.
searchBar
=
[[
UISearchBar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
SCREEN_WIDTH
,
50
)];
self
.
searchBar
.
backgroundImage
=
[
UIImage
imageWithColor
:[
UIColor
colorWithRed
:
0
.
953
green
:
0
.
439
blue
:
0
.
063
alpha
:
1
.
000
]];
self
.
searchBar
.
tintColor
=
[
UIColor
whiteColor
];
self
.
searchBar
.
placeholder
=
@"请输入关键字"
;
self
.
searchBar
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
searchBar
];
}
#pragma mark =========== searbar delegate ===========
-
(
void
)
searchBarCancelButtonClicked
:
(
UISearchBar
*
)
searchBar
{
[
self
.
view
endEditing
:
YES
];
searchBar
.
showsCancelButton
=
NO
;
}
-
(
void
)
searchBar
:
(
UISearchBar
*
)
searchBar
textDidChange
:
(
NSString
*
)
searchText
{
self
.
searchText
=
searchText
;
}
-
(
BOOL
)
searchBarShouldBeginEditing
:
(
UISearchBar
*
)
searchBar
{
searchBar
.
showsCancelButton
=
YES
;
return
YES
;
}
-
(
void
)
searchBarSearchButtonClicked
:
(
UISearchBar
*
)
searchBar
{
[
self
.
view
endEditing
:
YES
];
}
-
(
void
)
setUpTableView
{
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
searchBar
.
bottom
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
-
self
.
searchBar
.
bottom
-
64
)
style
:
UITableViewStylePlain
];
// self.tableView.backgroundColor = [UIColor greenColor];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
registerClass
:[
UITableViewCell
class
]
forCellReuseIdentifier
:
kCellId
];
[
self
.
view
addSubview
:
self
.
tableView
];
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
20
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"星巴克【A01-0%ld】"
,
(
long
)
indexPath
.
row
];
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
vanke/view_iPhone/templates/salesInput/Controller/HistoryViewController.m
View file @
2fad88d4
...
...
@@ -9,10 +9,11 @@
#import "HistoryViewController.h"
#import "HistoryTopView.h"
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度
#define kListHeight 4
4
#define kListHeight 4
0
#define kBottomHeight 60 //表格最底部的那行的宽度
@interface
HistoryViewController
()
@interface
HistoryViewController
()
<
UIScrollViewDelegate
>
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
@property
(
nonatomic
,
strong
)
NSArray
*
titles
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
...
...
@@ -24,7 +25,7 @@
[
super
viewDidLoad
];
self
.
automaticallyAdjustsScrollViewInsets
=
NO
;
self
.
title
=
@"历史"
;
self
.
titles
=
@[
@"
标题1"
,
@"标题2"
,
@"标题2"
,
@"标题2"
,
@"标题2
"
];
self
.
titles
=
@[
@"
日期"
,
@"金额(元)"
,
@"现金"
,
@"刷卡"
,
@"优惠券
"
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
setUpTopView
];
[
self
setUPScrollView
];
...
...
@@ -34,32 +35,86 @@
-
(
void
)
setUPScrollView
{
self
.
scrollView
=
[[
UIScrollView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
150
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
-
150
-
64
)];
self
.
scrollView
.
contentSize
=
CGSizeMake
(
kListWidth
*
self
.
titles
.
count
,
kListHeight
*
19
+
kBottomHeight
);
self
.
scrollView
.
contentSize
=
CGSizeMake
(
kListWidth
*
self
.
titles
.
count
,
kListHeight
*
klineCount
+
kBottomHeight
);
self
.
scrollView
.
bounces
=
NO
;
self
.
scrollView
.
delegate
=
self
;
for
(
int
i
=
0
;
i
<
self
.
titles
.
count
;
i
++
)
{
for
(
int
j
=
0
;
j
<
klineCount
;
j
++
)
{
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
kListHeight
+
kListHeight
*
j
,
kListWidth
,
kListHeight
)];
label
.
textAlignment
=
NSTextAlignmentCenter
;
label
.
text
=
[
NSString
stringWithFormat
:
@"假数据假%d"
,
j
];
[
self
.
scrollView
insertSubview
:
label
atIndex
:
0
];
//防止前面的别挡住
label
.
backgroundColor
=
[
UIColor
colorWithRed
:
1
.
000
green
:
0
.
976
blue
:
0
.
953
alpha
:
1
.
000
];
if
(
i
==
0
)
{
label
.
tag
=
3000
+
j
;
}
else
if
(
i
==
1
){
//金额
label
.
textColor
=
[
UIColor
redColor
];
}
}
//顶部的浮动视图
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
0
,
kListWidth
,
44
)];
label
.
tag
=
1000
+
i
;
label
.
text
=
self
.
titles
[
i
];
label
.
font
=
[
UIFont
systemFontOfSize
:
19
];
label
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
scrollView
addSubview
:
label
];
for
(
int
j
=
0
;
j
<
19
;
j
++
)
{
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
kListHeight
+
kListHeight
*
j
,
kListWidth
,
kListHeight
)];
label
.
textAlignment
=
NSTextAlignmentCenter
;
label
.
text
=
[
NSString
stringWithFormat
:
@"假数据假%d"
,
j
];
if
(
i
!=
0
)
{
[
self
.
scrollView
insertSubview
:
label
belowSubview
:[
self
.
scrollView
viewWithTag
:
1000
+
i
-
1
]];
//防止前面的别挡住
}
else
{
[
self
.
scrollView
addSubview
:
label
];
}
label
.
backgroundColor
=
[
UIColor
whiteColor
];
label
.
backgroundColor
=
[
UIColor
colorWithRed
:
1
.
000
green
:
0
.
976
blue
:
0
.
953
alpha
:
1
.
000
];
UILabel
*
labelBottom
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
kListHeight
+
kListHeight
*
18
,
kListWidth
,
kBottomHeight
)];
//底部浮动的视图
UILabel
*
labelBottom
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
self
.
scrollView
.
contentOffset
.
y
+
self
.
scrollView
.
height
-
kBottomHeight
,
kListWidth
,
kBottomHeight
)];
labelBottom
.
text
=
self
.
titles
[
i
];
labelBottom
.
backgroundColor
=
[
UIColor
grayColor
];
labelBottom
.
font
=
[
UIFont
systemFontOfSize
:
2
0
];
labelBottom
.
font
=
[
UIFont
systemFontOfSize
:
2
8
];
labelBottom
.
textAlignment
=
NSTextAlignmentCenter
;
labelBottom
.
tag
=
2000
+
i
;
[
self
.
scrollView
addSubview
:
labelBottom
];
if
(
i
!=
0
)
{
[
self
.
scrollView
insertSubview
:
labelBottom
belowSubview
:[
self
.
scrollView
viewWithTag
:
2000
+
i
-
1
]];
//防止前面的别挡住
if
(
i
==
1
)
{
labelBottom
.
textColor
=
[
UIColor
redColor
];
}
else
{
labelBottom
.
textColor
=
[
UIColor
whiteColor
];
}
}
else
{
[
self
.
scrollView
addSubview
:
labelBottom
];
}
}
[
self
.
view
addSubview
:
self
.
scrollView
];
}
-
(
void
)
scrollViewDidScroll
:
(
UIScrollView
*
)
scrollView
{
for
(
int
i
=
0
;
i
<
self
.
titles
.
count
;
i
++
)
{
UILabel
*
label
=
(
UILabel
*
)[
scrollView
viewWithTag
:
1000
+
i
];
label
.
y
=
scrollView
.
contentOffset
.
y
;
UILabel
*
labelBottom
=
(
UILabel
*
)[
scrollView
viewWithTag
:
2000
+
i
];
labelBottom
.
y
=
self
.
scrollView
.
contentOffset
.
y
+
self
.
scrollView
.
height
-
kBottomHeight
;
if
(
i
==
0
)
{
label
.
x
=
scrollView
.
contentOffset
.
x
;
labelBottom
.
x
=
scrollView
.
contentOffset
.
x
;
}
}
for
(
int
i
=
0
;
i
<
klineCount
;
i
++
)
{
UILabel
*
label
=
(
UILabel
*
)[
scrollView
viewWithTag
:
3000
+
i
];
label
.
x
=
scrollView
.
contentOffset
.
x
;
}
}
-
(
void
)
setUpTopView
{
HistoryTopView
*
topView
=
[
self
viewWithNibName
:
@"HistoryTopView"
];
...
...
vanke/view_iPhone/templates/salesInput/Controller/SalesInputViewController.m
View file @
2fad88d4
...
...
@@ -11,10 +11,14 @@
#import "SalesInputTableViewCell.h"
#import "VankeAppBoard_iPhone.h"
#import "HistoryViewController.h"
#import "ChooseShopViewController.h"
#define kCellID @"SalesInputTableViewCell.h"
@interface
SalesInputViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
SalesInputTopView
*
topView
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@property
(
nonatomic
,
strong
)
UIImage
*
navigationbarColorImage
;
@end
@implementation
SalesInputViewController
...
...
@@ -68,6 +72,9 @@ ON_WILL_APPEAR( signal )
-
(
void
)
setUpNavigationBar
{
self
.
navigationItem
.
title
=
@"销售录入"
;
self
.
navigationController
.
navigationBar
.
backgroundImage
=
[
UIImage
imageWithColor
:[
UIColor
colorWithRed
:
0
.
953
green
:
0
.
439
blue
:
0
.
063
alpha
:
1
.
000
]];
UIBarButtonItem
*
rightBtn
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"历史"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
goToHistory
)];
rightBtn
.
tintColor
=
[
UIColor
whiteColor
];
self
.
navigationItem
.
rightBarButtonItem
=
rightBtn
;
...
...
@@ -78,9 +85,52 @@ ON_WILL_APPEAR( signal )
-
(
void
)
setUpTopView
{
SalesInputTopView
*
topView
=
[
self
viewWithNibName
:
@"SalesInputTopView"
];
topView
.
frame
=
CGRectMake
(
0
,
-
300
,
SCREEN_WIDTH
,
300
);
self
.
topView
=
topView
;
topView
.
nameTapActionBlock
=
^
{
[
self
chooseShopAction
];
};
topView
.
dateTapActionBlock
=
^
{
NSLog
(
@"date"
);
[
self
showDatePickerView
];
};
[
self
.
tableView
addSubview
:
topView
];
}
-
(
void
)
chooseShopAction
{
ChooseShopViewController
*
chooseVC
=
[[
ChooseShopViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
chooseVC
animated
:
YES
];
}
-
(
UIDatePicker
*
)
datePicker
{
if
(
!
_datePicker
)
{
_datePicker
=
[[
UIDatePicker
alloc
]
initWithFrame
:
CGRectMake
(
0
,
SCREEN_HEIGHT
,
SCREEN_WIDTH
,
216
)];
_datePicker
.
backgroundColor
=
[
UIColor
colorWithWhite
:
0
.
902
alpha
:
1
.
000
];
_datePicker
.
date
=
[
NSDate
date
];
// _datePicker.minimumDate = [NSDate dateWithTimeIntervalSinceNow:72 * 60 * 60 * -1]; // 设置最小时间
// _datePicker.maximumDate = [NSDate dateWithTimeIntervalSinceNow:72 * 60 * 60]; // 设置最大时间
_datePicker
.
datePickerMode
=
UIDatePickerModeDate
;
[
_datePicker
addTarget
:
self
action
:
@selector
(
oneDatePickerValueChanged
:
)
forControlEvents
:
UIControlEventValueChanged
];
// 添加监听器
[
self
.
view
addSubview
:
_datePicker
];
}
return
_datePicker
;
}
#pragma mark - 实现oneDatePicker的监听方法
-
(
void
)
oneDatePickerValueChanged
:
(
UIDatePicker
*
)
sender
{
// 在控制台打印消息
NSLog
(
@"%@"
,
[
sender
date
]);
}
-
(
void
)
showDatePickerView
{
self
.
datePicker
.
top
=
SCREEN_HEIGHT
-
216
-
64
;
}
-
(
id
)
viewWithNibName
:
(
NSString
*
)
viewName
{
NSArray
*
nibView
=
[[
NSBundle
mainBundle
]
loadNibNamed
:
viewName
owner
:
nil
options
:
nil
];
return
[
nibView
objectAtIndex
:
0
];
...
...
@@ -92,6 +142,7 @@ ON_WILL_APPEAR( signal )
[
self
.
navigationController
pushViewController
:
history
animated
:
YES
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTopView.h
View file @
2fad88d4
...
...
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
typedef
void
(
^
tapBlock
)(
void
);
@interface
SalesInputTopView
:
UIView
@property
(
nonatomic
,
copy
)
tapBlock
nameTapActionBlock
;
@property
(
nonatomic
,
copy
)
tapBlock
dateTapActionBlock
;
@end
vanke/view_iPhone/templates/salesInput/View/SalesInputTopView.m
View file @
2fad88d4
...
...
@@ -10,6 +10,8 @@
@interface
SalesInputTopView
()
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
viewRedBac
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelShopName
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelDate
;
@end
...
...
@@ -19,6 +21,17 @@
-
(
void
)
awakeFromNib
{
self
.
viewRedBac
.
layer
.
cornerRadius
=
7
;
}
-
(
IBAction
)
labelNameTapAction
:
(
id
)
sender
{
self
.
nameTapActionBlock
();
}
-
(
IBAction
)
labelDateAction
:
(
id
)
sender
{
self
.
dateTapActionBlock
();
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTopView.xib
View file @
2fad88d4
...
...
@@ -58,6 +58,9 @@
<constraints>
<constraint
firstAttribute=
"height"
constant=
"53"
id=
"ox5-t0-4uQ"
/>
</constraints>
<connections>
<action
selector=
"labelNameTapAction:"
destination=
"iN0-l3-epB"
eventType=
"touchUpInside"
id=
"tmQ-CQ-lbC"
/>
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7BV-nx-jgh"
>
<rect
key=
"frame"
x=
"137"
y=
"68"
width=
"228"
height=
"53"
/>
...
...
@@ -65,6 +68,9 @@
<constraint
firstAttribute=
"height"
constant=
"53"
id=
"EID-y0-xQe"
/>
<constraint
firstAttribute=
"height"
relation=
"greaterThanOrEqual"
constant=
"53"
id=
"l9y-V0-7s4"
/>
</constraints>
<connections>
<action
selector=
"labelDateAction:"
destination=
"iN0-l3-epB"
eventType=
"touchUpInside"
id=
"MC5-Ic-ejD"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
red=
"0.95294117647058818"
green=
"0.4392156862745098"
blue=
"0.062745098039215685"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
@@ -107,7 +113,7 @@
<constraint
firstAttribute=
"height"
constant=
"21"
id=
"5fN-9C-guj"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<color
key=
"textColor"
cocoaTouchSystemColor=
"darkTextColor
"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB
"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
verticalHuggingPriority=
"251"
text=
"今日累计(元)"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"0Tf-uD-k10"
>
...
...
@@ -116,7 +122,7 @@
<constraint
firstAttribute=
"height"
constant=
"21"
id=
"uzU-y4-J5A"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<color
key=
"textColor"
cocoaTouchSystemColor=
"darkTextColor
"
/>
<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=
"rGj-X2-ZjJ"
>
...
...
@@ -222,6 +228,8 @@
</mask>
</variation>
<connections>
<outlet
property=
"labelDate"
destination=
"bGh-xS-xLq"
id=
"kqj-Us-miY"
/>
<outlet
property=
"labelShopName"
destination=
"dRE-Ph-BBH"
id=
"KsU-if-OPN"
/>
<outlet
property=
"viewRedBac"
destination=
"rGj-X2-ZjJ"
id=
"dyi-FV-Lc1"
/>
</connections>
<point
key=
"canvasLocation"
x=
"213.5"
y=
"16"
/>
...
...
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