Commit f4ff7823 authored by Sandy's avatar Sandy

添加没有客户的提示

parent edb8a475
{
"images" : [
{
"idiom" : "universal",
"filename" : "no_customer.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "no_customer@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "no_customer@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
#import "MJRefresh.h"
#define kPageSize 10
#define kCellId @"CustomerTableViewCell.h"
@interface CustomerManagementViewController ()<UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource>
@interface CustomerManagementViewController ()<UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@property (nonatomic, strong) UISearchBar *searchBar;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) JavenSortView *sortView;
......@@ -44,6 +44,28 @@
[self setUpData];
// Do any additional setup after loading the view.
}
#pragma mark - empty state
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
return [UIImage imageNamed:@"no_customer"];
}
- (CAAnimation *)imageAnimationForEmptyDataSet:(UIScrollView *)scrollView {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath: @"transform"];
animation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_2, 0.0, 0.0, 1.0)];
animation.duration = 1;
animation.cumulative = YES;
animation.repeatCount = MAXFLOAT;
return animation;
}
- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView {
return [UIColor whiteColor];
}
- (void)setUpDefaultConditions {
self.field = @"commission";
......@@ -51,8 +73,6 @@
self.customerCreateDate = @"2011-04-09 00:00:00";
}
- (NSMutableArray *)arrCellData {
if (!_arrCellData) {
_arrCellData = [NSMutableArray array];
......@@ -248,6 +268,7 @@
- (void)setUptableView {
self.tableView = [UITableView plainTableViewWithTarget:self cellNibName:@"CustomerTableViewCell" cellId:kCellId];
[self.view addSubview:self.tableView];
self.tableView.tableFooterView = [UIView new];
self.tableView.sd_layout.topSpaceToView(self.sortView,0).leftEqualToView(self.view).rightEqualToView(self.view).bottomEqualToView(self.view);
WS(weakSelf)
......
......@@ -15,6 +15,8 @@
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
tableView.dataSource = target;
tableView.delegate = target;
tableView.emptyDataSetSource = target;
tableView.emptyDataSetDelegate = target;
[tableView registerNib:[UINib nibWithNibName:nibName bundle:[NSBundle mainBundle]] forCellReuseIdentifier:cellId];
return tableView;
}
......
......@@ -25,5 +25,6 @@
#import "MobClick.h"
#import "NSString+OrderState.h"
#import "JV_TestTool.h"
#import "UIScrollView+EmptyDataSet.h"
#endif /* IMPHeader_h */
......@@ -14,4 +14,5 @@ pod 'SobotFramework', '~> 1.4.2'
pod 'MJRefresh', '~> 3.1.0'
pod 'UMengAnalytics-NO-IDFA'
pod 'Pingpp/Alipay', '~> 2.2.6'
pod 'Pingpp/Wx', '~> 2.2.6'
\ No newline at end of file
pod 'Pingpp/Wx', '~> 2.2.6'
pod 'DZNEmptyDataSet'
\ No newline at end of file
......@@ -14,6 +14,7 @@ PODS:
- AFNetworking/Serialization (3.0.4)
- AFNetworking/UIKit (3.0.4):
- AFNetworking/NSURLSession
- DZNEmptyDataSet (1.8.1)
- FMDB (2.6.2):
- FMDB/standard (= 2.6.2)
- FMDB/standard (2.6.2)
......@@ -45,6 +46,7 @@ PODS:
DEPENDENCIES:
- AFNetworking (~> 3.0.4)
- DZNEmptyDataSet
- FMDB (~> 2.6)
- IQKeyboardManager (~> 4.0.0)
- MBProgressHUD (~> 0.9.2)
......@@ -73,6 +75,7 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
FMDB: 854a0341b4726e53276f2a8996f06f1b80f9259a
HappyDNS: 6d85942e64c28b4fa61f8c76580398f52d6d1d11
IQKeyboardManager: 2341089c4ae25fa2fa82ce356a259fcd267dc6b6
......
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