Commit bcea668cd8796f1cbf910ea5658253ef71ad4ce7

Authored by zhangxiaowen
1 parent 4f709eb1

no message

CNLiveBalanceModule/Classes/Controller/CNLiveMonthBillController.m
... ... @@ -56,7 +56,7 @@ static const CGFloat height = 60;
56 56 [CNLiveBalanceRequest getTradingRecordWithType:self.type startTime:self.startTime endTime:self.endTime block:^(BOOL isSuccess, NSDictionary * _Nonnull data, NSError *error) {
57 57 [self.tableView.mj_header endRefreshing];
58 58 [self.tableView.mj_footer endRefreshing];
59   -
  59 + self.monthBillView.interactionEnabled = YES;
60 60 if (error) {
61 61 [self.data removeAllObjects];
62 62 [self.tableView reloadData];
... ... @@ -140,7 +140,7 @@ static const CGFloat height = 60;
140 140 - (void)switchType:(NSString *)type{
141 141 if(self.type != type){
142 142 self.type = type;
143   - [self loadData];
  143 + [self.tableView.mj_header beginRefreshing];
144 144 }
145 145 }
146 146  
... ...
CNLiveBalanceModule/Classes/View/CNLiveMonthBillView.h
... ... @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
20 20 @interface CNLiveMonthBillView : UIView
21 21 @property (nonatomic, weak) id<CNLiveMonthBillViewDelegate> delegate;
22 22 @property (nonatomic, copy) NSString *date;
23   -
  23 +@property (nonatomic, assign) BOOL interactionEnabled;
24 24 @end
25 25  
26 26 NS_ASSUME_NONNULL_END
... ...
CNLiveBalanceModule/Classes/View/CNLiveMonthBillView.m
... ... @@ -134,12 +134,18 @@ static const NSInteger margin = 20;
134 134 NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
135 135 datePicker.minimumDate = [dateFormatter dateFromString:@"2017年1月"];
136 136 datePicker.maximumDate = [dateFormatter dateFromString:dateString];
137   - [(UIViewController *)self.delegate presentViewController:datePickManager animated:false completion:nil];
138   -
  137 + [(UIViewController *)self.delegate presentViewController:datePickManager animated:NO completion:nil];
  138 +
139 139 }
  140 +- (void)setInteractionEnabled:(BOOL)interactionEnabled{
  141 + _interactionEnabled = interactionEnabled;
  142 + _defray.userInteractionEnabled = interactionEnabled;
  143 + _income.userInteractionEnabled = interactionEnabled;
140 144  
  145 +}
141 146 - (void)btnDidClicked:(UIButton *)btn{
142 147 if (self.delegate && [self.delegate respondsToSelector:@selector(switchType:)]) {
  148 + btn.userInteractionEnabled = NO;
143 149 if(btn.tag == 10000){//收入
144 150 [self.delegate switchType:@"1"];
145 151 _defray.selected = YES;
... ...
CNLiveBalanceModule/Classes/View/CNLiveTradingRecordView.m
... ... @@ -121,7 +121,7 @@ static const NSInteger height = 30;
121 121 NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
122 122 datePicker.minimumDate = [dateFormatter dateFromString:@"2017年1月"];
123 123 datePicker.maximumDate = [dateFormatter dateFromString:dateString];
124   - [(UIViewController *)self.delegate presentViewController:datePickManager animated:false completion:nil];
  124 + [(UIViewController *)self.delegate presentViewController:datePickManager animated:NO completion:nil];
125 125  
126 126 }
127 127  
... ...