Commit cb899c68 authored by Achilles's avatar Achilles

no message

parent 3569c83a
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
# platform :ios, '6.1' # platform :ios, '6.1'
platform :ios, '8.0' platform :ios, '7.0'
xcodeproj 'vanke.xcodeproj' xcodeproj 'vanke.xcodeproj'
pod 'AFNetworking', '~> 2.3.1' pod 'AFNetworking', '~> 2.3.1'
...@@ -19,8 +19,8 @@ pod 'MBProgressHUD', '~> 0.9.1' ...@@ -19,8 +19,8 @@ pod 'MBProgressHUD', '~> 0.9.1'
pod 'SDWebImage', '~> 3.7.1' pod 'SDWebImage', '~> 3.7.1'
#pod 'MBProgressHUD', '~> 0.8' #pod 'MBProgressHUD', '~> 0.8'
#pod 'SSKeychain', '~> 1.2' #pod 'SSKeychain', '~> 1.2'
pod 'IQKeyboardManager', '~> 4.0.0'
#pod 'IQKeyboardManager', '~> 3.2.3' pod 'IQKeyboardManager', '~> 3.2.3'
#pod 'Reachability' #pod 'Reachability'
#pod 'jastor', '~> 0.2.1' #lib. for jaskon object mapping #pod 'jastor', '~> 0.2.1' #lib. for jaskon object mapping
#pod 'BaiduMapAPI', '~> 2.7.0' #pod 'BaiduMapAPI', '~> 2.7.0'
......
This diff is collapsed.
...@@ -93,9 +93,6 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) { ...@@ -93,9 +93,6 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
- (void)postUrl:(NSString *)url params:(id)params success:(void (^)(id data))succ failure:(void (^)(id data))fail;
- (void)getUrl:(NSString *)url params:(id)params success:(void (^)(id data))succ failure:(void (^)(id data))fail;
@end @end
...@@ -705,17 +705,4 @@ acceptTypeJson:YES ...@@ -705,17 +705,4 @@ acceptTypeJson:YES
// TODO // TODO
} }
- (void)getUrl:(NSString *)url params:(id)params success:(void (^)(id data))succ failure:(void (^)(id data))fail {
[self GET:url parameters:params needToken:YES acceptTypeJson:YES success:^(AFHTTPRequestOperation *operation, id responseObject) {
succ(responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
fail(error);
}];
}
@end @end
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "right_icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "right_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "sales_top_input_pic.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "sales_top_input_pic@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -23,14 +23,13 @@ ...@@ -23,14 +23,13 @@
#import "VankeNoticeListBoard_iPhone.h" #import "VankeNoticeListBoard_iPhone.h"
#import "VankeStatementListBoard_iPhone.h" #import "VankeStatementListBoard_iPhone.h"
#import "ICRAnnouncementViewController.h" #import "ICRAnnouncementViewController.h"
#import "SalesInputViewController.h"
#pragma mark - #pragma mark -
@interface VankeAffairsBoard_iPhone() @interface VankeAffairsBoard_iPhone()
{ {
//<#@private var#> //<#@private var#>
NSArray *authorizedOrgs; NSArray *authorizedOrgs;
UIImage *navibarImage;
} }
@end @end
...@@ -70,8 +69,6 @@ ON_LAYOUT_VIEWS( signal ) ...@@ -70,8 +69,6 @@ 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;
...@@ -95,8 +92,8 @@ ON_DID_DISAPPEAR( signal ) ...@@ -95,8 +92,8 @@ ON_DID_DISAPPEAR( signal )
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnNotice, signal) { ON_SIGNAL3(VankeAffairsBoard_iPhone, btnNotice, signal) {
[[VankeAppBoard_iPhone sharedInstance] hideMenu]; [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// VankeNoticeListBoard_iPhone *board = [VankeNoticeListBoard_iPhone board]; VankeNoticeListBoard_iPhone *board = [VankeNoticeListBoard_iPhone board];
ICRAnnouncementViewController *board = [ICRAnnouncementViewController board]; // ICRAnnouncementViewController *board = [ICRAnnouncementViewController board];
[self.stack pushBoard:board animated:YES]; [self.stack pushBoard:board animated:YES];
} }
...@@ -126,11 +123,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) { ...@@ -126,11 +123,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
} }
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) { ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init]; [GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f];
[self.navigationController pushViewController:salesVC animated:YES];
//[GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f];
} }
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) { ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
......
//
// 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 {
self.chooseBlock(@"选择好了商铺");
[self.navigationController popViewControllerAnimated:YES];
}
- (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
//
// HistoryViewController.h
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HistoryViewController : UIViewController
@end
//
// HistoryViewController.m
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "HistoryViewController.h"
#import "HistoryTopView.h"
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度
#define kListHeight 40
#define kBottomHeight 60 //表格最底部的那行的宽度
@interface HistoryViewController ()<UIScrollViewDelegate>
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) NSArray *titles;
@property (nonatomic, strong) UIScrollView *scrollView;
@end
@implementation HistoryViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
self.title = @"历史";
self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"];
self.view.backgroundColor = [UIColor whiteColor];
[self setUpTopView];
[self setUPScrollView];
// Do any additional setup after loading the view.
}
- (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 * 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;
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, self.scrollView.contentOffset.y + self.scrollView.height - kBottomHeight, kListWidth, kBottomHeight)];
labelBottom.text = self.titles[i];
labelBottom.backgroundColor = [UIColor grayColor];
labelBottom.font = [UIFont systemFontOfSize:28];
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"];
topView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 150);
[self.view addSubview:topView];
}
- (id)viewWithNibName:(NSString *)viewName {
NSArray* nibView = [[NSBundle mainBundle] loadNibNamed:viewName owner:nil options:nil];
return [nibView objectAtIndex:0];
}
- (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
//
// SalesInputViewController.h
// vanke
//
// Created by Z on 16/4/15.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "IBTUIViewController.h"
@interface SalesInputViewController : UIViewController
@end
//
// SalesInputViewController.m
// vanke
//
// Created by Z on 16/4/15.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "SalesInputViewController.h"
#import "SalesInputTopView.h"
#import "SalesInputTableViewCell.h"
#import "VankeAppBoard_iPhone.h"
#import "HistoryViewController.h"
#import "ChooseShopViewController.h"
#import "VankeUserLoginAPI.h"
#import "ICRHTTPController.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
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
[self setUpNavigationBar];
[self setUpTableView];
[self setUpTopView];
// Do any additional setup after loading the view.
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
}
ON_WILL_APPEAR( signal )
{
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
}
- (void)setUpTableView {
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - 64) style:UITableViewStylePlain];
self.tableView.contentInset = UIEdgeInsetsMake(300, 0, 0, 0);
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.tableView registerNib:[UINib nibWithNibName:@"SalesInputTableViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:kCellID];
[self.view addSubview:self.tableView];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 6;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
SalesInputTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellID forIndexPath:indexPath];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 50;
}
- (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;
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
}
- (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];
chooseVC.chooseBlock = ^(NSString *string){
[self.topView setShopName:string];
};
[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];
}
- (void)goToHistory {
HistoryViewController *history = [[HistoryViewController alloc] init];
[self.navigationController pushViewController:history animated:YES];
}
- (void)setUpData {
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
NSDictionary *myDictionary = @{@"shopCodeEquals" : @"a",
@"beginDateEquals" : @"a",
@"endDateEquals" : @"a",
@"pageNumber" : @0,
@"pageSize" : @0};
}
- (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
//
// HistoryTopView.h
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HistoryTopView : UIView
@end
//
// HistoryTopView.m
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "HistoryTopView.h"
@interface HistoryTopView ()
@property (weak, nonatomic) IBOutlet UIButton *buttonQuery;
@end
@implementation HistoryTopView
-(void)awakeFromNib {
self.buttonQuery.layer.cornerRadius = 5;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
//
// SalesInputTableViewCell.h
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SalesInputTableViewCell : UITableViewCell
@end
//
// SalesInputTableViewCell.m
// vanke
//
// Created by Z on 16/4/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "SalesInputTableViewCell.h"
@interface SalesInputTableViewCell ()<UITextViewDelegate>
@property (weak, nonatomic) IBOutlet UITextField *textFieldAmount;
@property (weak, nonatomic) IBOutlet UITextField *txtfieldSum;
@end
@implementation SalesInputTableViewCell
- (void)awakeFromNib {
// Initialization code
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.superview endEditing:YES];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="60" id="KGk-i7-Jjw" customClass="SalesInputTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="59"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付方式" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="42B-69-MrJ">
<rect key="frame" x="8" y="19" width="104" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DwV-QQ-nIc">
<rect key="frame" x="243" y="7" width="104" height="45"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="vCb-q8-qdd"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="IOd-nI-Sgk">
<rect key="frame" x="126" y="7" width="103" height="45"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="Tti-cq-XrO"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<constraints>
<constraint firstItem="42B-69-MrJ" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="30G-yc-aMR"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="4zD-3a-Npn"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="leading" secondItem="IOd-nI-Sgk" secondAttribute="trailing" constant="14" id="IDn-fs-A6c"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="leading" secondItem="42B-69-MrJ" secondAttribute="trailing" constant="14" id="K0R-E6-pq2"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="width" secondItem="42B-69-MrJ" secondAttribute="width" id="LyE-89-ZUP"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" constant="-20" id="X6v-gb-CsP"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="gLQ-a3-OwZ"/>
<constraint firstItem="IOd-nI-Sgk" firstAttribute="leading" secondItem="42B-69-MrJ" secondAttribute="trailing" constant="14" id="m7d-pg-dI8"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="leading" secondItem="IOd-nI-Sgk" secondAttribute="trailing" constant="14" id="nFY-mV-eit"/>
<constraint firstItem="42B-69-MrJ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="nZ2-4B-4Hr"/>
<constraint firstItem="DwV-QQ-nIc" firstAttribute="width" secondItem="42B-69-MrJ" secondAttribute="width" id="wRK-zA-B9k"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="textFieldAmount" destination="IOd-nI-Sgk" id="5cG-QC-dtr"/>
<outlet property="txtfieldSum" destination="DwV-QQ-nIc" id="sTl-vV-Iet"/>
</connections>
<point key="canvasLocation" x="158.5" y="379"/>
</tableViewCell>
</objects>
</document>
//
// SalesInputTopView.h
// vanke
//
// Created by Z on 16/4/15.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void (^tapBlock)(void);
@interface SalesInputTopView : UIView
@property (nonatomic, copy) tapBlock nameTapActionBlock;
@property (nonatomic, copy) tapBlock dateTapActionBlock;
- (void)setShopName:(NSString *)name;
- (void)setDate:(NSString *)date;
@end
//
// SalesInputTopView.m
// vanke
//
// Created by Z on 16/4/15.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "SalesInputTopView.h"
@interface SalesInputTopView ()
@property (weak, nonatomic) IBOutlet UIView *viewRedBac;
@property (weak, nonatomic) IBOutlet UILabel *labelShopName;
@property (weak, nonatomic) IBOutlet UILabel *labelDate;
@end
@implementation SalesInputTopView
- (void)setShopName:(NSString *)name
{
self.labelShopName.text = name;
}
- (void)setDate:(NSString *)date
{
self.labelDate.text = date;
}
- (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.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
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