Commit e3a67b29 authored by Sandy's avatar Sandy

界面小修改

parent 908f0d28
......@@ -22,10 +22,10 @@
#define VANKE_BAIDU_WEATHER_SERVER_URL @"http://api.map.baidu.com/telematics/v3/weather"
// 后台服务基准地址
//#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest"
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest"
// 测试环境
#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
//#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
// 后台多媒体文件基准地址
......
......@@ -12,10 +12,11 @@
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度
#define kListHeight 40
#define kBottomHeight 60 //表格最底部的那行的宽度
#define kBottomHeight 55 //表格最底部的那行的宽度
@interface HistoryViewController ()<UIScrollViewDelegate>
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) NSArray *titles;
@property (nonatomic, strong) NSArray *bottomTitles;
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) HistoryTopView *topView;
@end
......@@ -27,6 +28,7 @@
self.automaticallyAdjustsScrollViewInsets = NO;
self.title = @"历史";
self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"];
self.bottomTitles = @[@"总计",@"18800",@"1880",@"998",@"300"];
self.view.backgroundColor = [UIColor whiteColor];
[self setUpTopView];
[self setUPScrollView];
......@@ -45,7 +47,7 @@
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];
label.text = [NSString stringWithFormat:@"test-%d", j];
[self.scrollView insertSubview:label atIndex:0];//防止前面的别挡住
label.backgroundColor = [UIColor colorWithRed:1.000 green:0.976 blue:0.953 alpha:1.000];
......@@ -72,9 +74,9 @@
//底部浮动的视图
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.bottomTitles[i];
labelBottom.backgroundColor = [UIColor grayColor];
labelBottom.font = [UIFont systemFontOfSize:28];
labelBottom.font = [UIFont systemFontOfSize:26];
labelBottom.textAlignment = NSTextAlignmentCenter;
labelBottom.tag = 2000 + i;
[self.scrollView addSubview:labelBottom];
......
......@@ -83,7 +83,6 @@ ON_WILL_APPEAR( signal )
WS(weakSelf)
cell.updateCellData = ^(NSArray *dataArr){
NSLog(@"%@", dataArr);
[weakSelf.cellDataDic setObject:dataArr forKey:indexPath];
[weakSelf countTotalMonney];
};
......@@ -191,6 +190,8 @@ ON_WILL_APPEAR( signal )
- (NSArray *)getCellDataArrWithIndexPath:(NSIndexPath *)indextPath {
//利用字典key的唯一性,保存每个cell上的数据
if (![self.cellDataDic objectForKey:indextPath]) {
[self.cellDataDic setObject:@[@"0",@"0"] forKey:indextPath];
}
......
......@@ -17,7 +17,7 @@
@implementation SalesInputTableViewCell
- (void)awakeFromNib {
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.textFieldAmount.delegate = self;
self.txtfieldSum.delegate = self;
......@@ -30,7 +30,7 @@
self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
}
//结束编辑
- (void)textFieldDidEndEditing:(UITextField *)textField {
NSLog(@"textField end editing");
......@@ -42,7 +42,11 @@
}
self.updateCellData(@[self.textFieldAmount.text, self.txtfieldSum.text]);
}
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[textField selectAll:self];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
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