Commit 2fad88d4 authored by Sandy's avatar Sandy

选择店铺界面搭建完成

parent dcf6e089
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* 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 */; }; 1928FD021CC487A10077BE34 /* SalesInputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1928FCFC1CC487A10077BE34 /* SalesInputViewController.m */; };
1928FD031CC487A10077BE34 /* SalesInputTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1928FD001CC487A10077BE34 /* SalesInputTopView.m */; }; 1928FD031CC487A10077BE34 /* SalesInputTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1928FD001CC487A10077BE34 /* SalesInputTopView.m */; };
1928FD041CC487A10077BE34 /* SalesInputTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1928FD011CC487A10077BE34 /* SalesInputTopView.xib */; }; 1928FD041CC487A10077BE34 /* SalesInputTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1928FD011CC487A10077BE34 /* SalesInputTopView.xib */; };
...@@ -714,6 +715,8 @@ ...@@ -714,6 +715,8 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference 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>"; }; 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>"; }; 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>"; }; 1928FCFF1CC487A10077BE34 /* SalesInputTopView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SalesInputTopView.h; sourceTree = "<group>"; };
...@@ -1973,6 +1976,8 @@ ...@@ -1973,6 +1976,8 @@
1928FCFC1CC487A10077BE34 /* SalesInputViewController.m */, 1928FCFC1CC487A10077BE34 /* SalesInputViewController.m */,
1928FD0A1CC4C59E0077BE34 /* HistoryViewController.h */, 1928FD0A1CC4C59E0077BE34 /* HistoryViewController.h */,
1928FD0B1CC4C59E0077BE34 /* HistoryViewController.m */, 1928FD0B1CC4C59E0077BE34 /* HistoryViewController.m */,
19000E701CC5DA7600DF8D71 /* ChooseShopViewController.h */,
19000E711CC5DA7600DF8D71 /* ChooseShopViewController.m */,
); );
path = Controller; path = Controller;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4671,6 +4676,7 @@ ...@@ -4671,6 +4676,7 @@
C1D5992C1BB44B2100D297FE /* Bee_MYSQL.m in Sources */, C1D5992C1BB44B2100D297FE /* Bee_MYSQL.m in Sources */,
C10F183A1BF7ACA80065F18C /* IBTCommon.m in Sources */, C10F183A1BF7ACA80065F18C /* IBTCommon.m in Sources */,
C1E0AD7C1C12FC7200DE6BB9 /* SRMonthPicker.m in Sources */, C1E0AD7C1C12FC7200DE6BB9 /* SRMonthPicker.m in Sources */,
19000E721CC5DA7600DF8D71 /* ChooseShopViewController.m in Sources */,
C1D599831BB44B2100D297FE /* CXMLDocument.m in Sources */, C1D599831BB44B2100D297FE /* CXMLDocument.m in Sources */,
C1D598FE1BB44B2000D297FE /* Bee_UITransitionFade.m in Sources */, C1D598FE1BB44B2000D297FE /* Bee_UITransitionFade.m in Sources */,
C1D599801BB44B2100D297FE /* Reachability.m in Sources */, C1D599801BB44B2100D297FE /* Reachability.m in Sources */,
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
{ {
//<#@private var#> //<#@private var#>
NSArray *authorizedOrgs; NSArray *authorizedOrgs;
UIImage *navibarImage;
} }
@end @end
...@@ -69,6 +70,8 @@ ON_LAYOUT_VIEWS( signal ) ...@@ -69,6 +70,8 @@ ON_LAYOUT_VIEWS( signal )
ON_WILL_APPEAR( 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"]; UIColor *color = [VankeUtil rgbStringToColor: @"237,27,35"];
if ( IOS7_OR_LATER ) { if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color; self.navigationController.navigationBar.barTintColor = color;
...@@ -124,10 +127,8 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) { ...@@ -124,10 +127,8 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) { ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init]; SalesInputViewController *salesVC = [[SalesInputViewController alloc] init];
// SalesInputViewController *salesVC = [SalesInputViewController board];
// [self.stack pushBoard:salesVC animated:YES];
// [salesVC setHidesBottomBarWhenPushed:YES];
[self.navigationController pushViewController:salesVC animated:YES]; [self.navigationController pushViewController:salesVC animated:YES];
//[GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f]; //[GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f];
} }
......
//
// 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
//
// 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
...@@ -9,10 +9,11 @@ ...@@ -9,10 +9,11 @@
#import "HistoryViewController.h" #import "HistoryViewController.h"
#import "HistoryTopView.h" #import "HistoryTopView.h"
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度 #define kListWidth 100 //一个表格的宽度
#define kListHeight 44 #define kListHeight 40
#define kBottomHeight 60 //表格最底部的那行的宽度 #define kBottomHeight 60 //表格最底部的那行的宽度
@interface HistoryViewController () @interface HistoryViewController ()<UIScrollViewDelegate>
@property (nonatomic, strong) UICollectionView *collectionView; @property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) NSArray *titles; @property (nonatomic, strong) NSArray *titles;
@property (nonatomic, strong) UIScrollView *scrollView; @property (nonatomic, strong) UIScrollView *scrollView;
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
[super viewDidLoad]; [super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO; self.automaticallyAdjustsScrollViewInsets = NO;
self.title = @"历史"; self.title = @"历史";
self.titles = @[@"标题1",@"标题2",@"标题2",@"标题2",@"标题2"]; self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"];
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
[self setUpTopView]; [self setUpTopView];
[self setUPScrollView]; [self setUPScrollView];
...@@ -34,32 +35,86 @@ ...@@ -34,32 +35,86 @@
- (void)setUPScrollView { - (void)setUPScrollView {
self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 150, SCREEN_WIDTH, SCREEN_HEIGHT - 150 - 64)]; 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 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)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(kListWidth * i, 0, kListWidth, 44)];
label.tag = 1000 + i;
label.text = self.titles[i]; label.text = self.titles[i];
label.font = [UIFont systemFontOfSize:19]; label.font = [UIFont systemFontOfSize:19];
label.textAlignment = NSTextAlignmentCenter; label.textAlignment = NSTextAlignmentCenter;
[self.scrollView addSubview:label]; if (i != 0) {
[self.scrollView insertSubview:label belowSubview:[self.scrollView viewWithTag:1000 + i -1]];//防止前面的别挡住
for (int j = 0; j < 19; j++) { }else{
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(kListWidth * i, kListHeight + kListHeight * j, kListWidth, kListHeight)];
label.textAlignment = NSTextAlignmentCenter;
label.text = [NSString stringWithFormat:@"假数据假%d", j];
[self.scrollView addSubview:label]; [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.text = self.titles[i];
labelBottom.backgroundColor = [UIColor grayColor]; labelBottom.backgroundColor = [UIColor grayColor];
labelBottom.font = [UIFont systemFontOfSize:20]; labelBottom.font = [UIFont systemFontOfSize:28];
labelBottom.textAlignment = NSTextAlignmentCenter; labelBottom.textAlignment = NSTextAlignmentCenter;
labelBottom.tag = 2000 + i;
[self.scrollView addSubview:labelBottom]; [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]; [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 { - (void)setUpTopView {
HistoryTopView *topView = [self viewWithNibName:@"HistoryTopView"]; HistoryTopView *topView = [self viewWithNibName:@"HistoryTopView"];
......
...@@ -11,10 +11,14 @@ ...@@ -11,10 +11,14 @@
#import "SalesInputTableViewCell.h" #import "SalesInputTableViewCell.h"
#import "VankeAppBoard_iPhone.h" #import "VankeAppBoard_iPhone.h"
#import "HistoryViewController.h" #import "HistoryViewController.h"
#import "ChooseShopViewController.h"
#define kCellID @"SalesInputTableViewCell.h" #define kCellID @"SalesInputTableViewCell.h"
@interface SalesInputViewController ()<UITableViewDelegate, UITableViewDataSource> @interface SalesInputViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) SalesInputTopView *topView;
@property (nonatomic, strong) UIDatePicker *datePicker;
@property (nonatomic, strong) UIImage *navigationbarColorImage;
@end @end
@implementation SalesInputViewController @implementation SalesInputViewController
...@@ -68,6 +72,9 @@ ON_WILL_APPEAR( signal ) ...@@ -68,6 +72,9 @@ ON_WILL_APPEAR( signal )
- (void)setUpNavigationBar { - (void)setUpNavigationBar {
self.navigationItem.title = @"销售录入"; 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)]; UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithTitle:@"历史" style:UIBarButtonItemStyleDone target:self action:@selector(goToHistory)];
rightBtn.tintColor = [UIColor whiteColor]; rightBtn.tintColor = [UIColor whiteColor];
self.navigationItem.rightBarButtonItem = rightBtn; self.navigationItem.rightBarButtonItem = rightBtn;
...@@ -78,9 +85,52 @@ ON_WILL_APPEAR( signal ) ...@@ -78,9 +85,52 @@ ON_WILL_APPEAR( signal )
- (void)setUpTopView { - (void)setUpTopView {
SalesInputTopView *topView = [self viewWithNibName:@"SalesInputTopView"]; SalesInputTopView *topView = [self viewWithNibName:@"SalesInputTopView"];
topView.frame = CGRectMake(0, -300, SCREEN_WIDTH, 300); 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]; [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 { - (id)viewWithNibName:(NSString *)viewName {
NSArray* nibView = [[NSBundle mainBundle] loadNibNamed:viewName owner:nil options:nil]; NSArray* nibView = [[NSBundle mainBundle] loadNibNamed:viewName owner:nil options:nil];
return [nibView objectAtIndex:0]; return [nibView objectAtIndex:0];
...@@ -92,6 +142,7 @@ ON_WILL_APPEAR( signal ) ...@@ -92,6 +142,7 @@ ON_WILL_APPEAR( signal )
[self.navigationController pushViewController:history animated:YES]; [self.navigationController pushViewController:history animated:YES];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
typedef void (^tapBlock)(void);
@interface SalesInputTopView : UIView @interface SalesInputTopView : UIView
@property (nonatomic, copy) tapBlock nameTapActionBlock;
@property (nonatomic, copy) tapBlock dateTapActionBlock;
@end @end
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
@interface SalesInputTopView () @interface SalesInputTopView ()
@property (weak, nonatomic) IBOutlet UIView *viewRedBac; @property (weak, nonatomic) IBOutlet UIView *viewRedBac;
@property (weak, nonatomic) IBOutlet UILabel *labelShopName;
@property (weak, nonatomic) IBOutlet UILabel *labelDate;
@end @end
...@@ -19,6 +21,17 @@ ...@@ -19,6 +21,17 @@
- (void)awakeFromNib { - (void)awakeFromNib {
self.viewRedBac.layer.cornerRadius = 7; 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. // Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation. // An empty implementation adversely affects performance during animation.
......
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
<constraints> <constraints>
<constraint firstAttribute="height" constant="53" id="ox5-t0-4uQ"/> <constraint firstAttribute="height" constant="53" id="ox5-t0-4uQ"/>
</constraints> </constraints>
<connections>
<action selector="labelNameTapAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="tmQ-CQ-lbC"/>
</connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7BV-nx-jgh"> <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"/> <rect key="frame" x="137" y="68" width="228" height="53"/>
...@@ -65,6 +68,9 @@ ...@@ -65,6 +68,9 @@
<constraint firstAttribute="height" constant="53" id="EID-y0-xQe"/> <constraint firstAttribute="height" constant="53" id="EID-y0-xQe"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="53" id="l9y-V0-7s4"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="53" id="l9y-V0-7s4"/>
</constraints> </constraints>
<connections>
<action selector="labelDateAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="MC5-Ic-ejD"/>
</connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" red="0.95294117647058818" green="0.4392156862745098" blue="0.062745098039215685" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.95294117647058818" green="0.4392156862745098" blue="0.062745098039215685" alpha="1" colorSpace="calibratedRGB"/>
...@@ -107,7 +113,7 @@ ...@@ -107,7 +113,7 @@
<constraint firstAttribute="height" constant="21" id="5fN-9C-guj"/> <constraint firstAttribute="height" constant="21" id="5fN-9C-guj"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <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"/> <nil key="highlightedColor"/>
</label> </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"> <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 @@ ...@@ -116,7 +122,7 @@
<constraint firstAttribute="height" constant="21" id="uzU-y4-J5A"/> <constraint firstAttribute="height" constant="21" id="uzU-y4-J5A"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <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"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rGj-X2-ZjJ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rGj-X2-ZjJ">
...@@ -222,6 +228,8 @@ ...@@ -222,6 +228,8 @@
</mask> </mask>
</variation> </variation>
<connections> <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"/> <outlet property="viewRedBac" destination="rGj-X2-ZjJ" id="dyi-FV-Lc1"/>
</connections> </connections>
<point key="canvasLocation" x="213.5" y="16"/> <point key="canvasLocation" x="213.5" y="16"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment