Commit fea1f537 authored by Sandy's avatar Sandy

筛选列表回收逻辑修改

parent ce7d5509
......@@ -16,5 +16,5 @@ typedef void (^selectedRow)(NSInteger);
@property (nonatomic, copy) selectedRow selecedBlock;
- (instancetype)customNew;
- (void)hide;
@end
......@@ -111,7 +111,6 @@
- (void)showTableView {
[self.coverView show];
//self.leftSortAction(YES);
[self viewController].navigationItem.leftBarButtonItem.enabled = NO;
WS(weakSelf)
self.isTableOpen = YES;
......@@ -123,7 +122,6 @@
- (void)hideTableView {
[self.coverView hide];
// self.leftSortAction(NO);
[self viewController].navigationItem.leftBarButtonItem.enabled = YES;
self.isTableOpen = NO;
WS(weakSelf)
[UIView animateWithDuration:0.3 animations:^{
......@@ -224,6 +222,13 @@
return nil;
}
- (void)hide {
if (self.isTableOpen == YES) {
[self leftAction:nil];
}
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
......
......@@ -17,4 +17,5 @@ typedef void (^selectedRow)(NSInteger);
- (instancetype)sortView;
- (void)hide;;
@end
......@@ -72,11 +72,7 @@
[self.window addSubview:_coverView];
WS(weakSelf)
_coverView.tapAction = ^{
if (weakSelf.arrTitles == weakSelf.arrLeft) {
[weakSelf leftAction:nil];
}else{
[weakSelf rightBtnAction];
}
[weakSelf hide];
};
......@@ -127,9 +123,9 @@
//设置界面上其它的按钮是否可以点击
- (void)setOtherUserInteraction:(BOOL)state {
[self viewController].navigationItem.leftBarButtonItem.enabled = state;
[self viewController].navigationItem.rightBarButtonItem.enabled = state;
[self viewController].view.userInteractionEnabled = state;
// [self viewController].navigationItem.leftBarButtonItem.enabled = state;
// [self viewController].navigationItem.rightBarButtonItem.enabled = state;
//[self viewController].view.userInteractionEnabled = state;
}
......@@ -269,6 +265,17 @@
return nil;
}
- (void)hide {
if (self.isTableOpen == YES) {
if (_arrTitles == _arrLeft) {
[self leftAction:nil];
}else{
[self rightBtnAction];
}
}
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
......
......@@ -9,6 +9,7 @@
#import "CommodityManagementTopView.h"
#import "UIView+Category.h"
#import "ManagementViewController.h"
#import "CommodityManagementViewController.h"
@interface CommodityManagementTopView ()
@property (weak, nonatomic) IBOutlet UIButton *buttonAdd;
@property (weak, nonatomic) IBOutlet UIButton *buttonManagement;
......@@ -25,13 +26,20 @@
- (IBAction)managementAct:(id)sender {
ManagementViewController *manageVC = [[ManagementViewController alloc] init];
[self hideSortView];
[[self viewController] PushViewController:manageVC animated:YES];
CLog(@"m");
}
- (IBAction)addAct:(id)sender {
[self hideSortView];
CLog(@"a");
}
- (void)hideSortView {
CommodityManagementViewController *commodityVC = (CommodityManagementViewController *)[self viewController];
[commodityVC.sorView hide];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
......
......@@ -47,6 +47,12 @@
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.sortView hide];
}
- (void)setUpCollectionView {
UICollectionViewFlowLayout *layOut = [[UICollectionViewFlowLayout alloc] init];
layOut.minimumLineSpacing = 10;
......
......@@ -7,7 +7,9 @@
//
#import "IBTUIViewController.h"
#import "CommodityManagementSortView.h"
@interface CommodityManagementViewController : IBTUIViewController
@property (nonatomic, strong) CommodityManagementSortView *sorView;
@end
......@@ -8,14 +8,12 @@
#import "CommodityManagementViewController.h"
#import "CommodityManagementTopView.h"
#import "CommodityManagementSortView.h"
#import "UITableView+Category.h"
#import "CommodityTableViewCell.h"
#define kCellId @"CommodityTableViewCell.h"
@interface CommodityManagementViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) CommodityManagementTopView *topView;
@property (nonatomic, strong) CommodityManagementSortView *sorView;
@property (nonatomic, strong) UITableView *tableView;
@end
......@@ -47,12 +45,20 @@
// Do any additional setup after loading the view.
}
#pragma mark =========== action ===========
- (void)searchAct {
[self.sorView hide];
CLog(@"search");
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.sorView hide];
}
#pragma mark =========== tableview delegate ===========
......
......@@ -7,7 +7,8 @@
//
#import "IBTUIViewController.h"
#import "CommodityManagementSortView.h"
@interface ManagementViewController : IBTUIViewController
@property (nonatomic, strong) CommodityManagementSortView *sorView;
@end
......@@ -7,14 +7,12 @@
//
#import "ManagementViewController.h"
#import "CommodityManagementSortView.h"
#import "CommodityTableViewCell.h"
#import "UITableView+Category.h"
#import "CommodityMutipleSelectBottomView.h"
#define kCellId @"CommodityTableViewCell.h"
@interface ManagementViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) CommodityManagementSortView *sorView;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) CommodityMutipleSelectBottomView *bottomView;
......
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