|
@@ -21,15 +21,13 @@
|
|
|
//#import "RTLabel.h"
|
|
//#import "RTLabel.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
-static const int delta = 25;
|
|
|
|
|
|
|
+const int delta = 25;
|
|
|
|
|
|
|
|
@interface ResultViewController () <JLRefreshDelegate,QLPreviewControllerDataSource,QLPreviewControllerDelegate>
|
|
@interface ResultViewController () <JLRefreshDelegate,QLPreviewControllerDataSource,QLPreviewControllerDelegate>
|
|
|
|
|
|
|
|
@property (nonatomic,strong) QLPreviewController *quickLook;
|
|
@property (nonatomic,strong) QLPreviewController *quickLook;
|
|
|
@property (nonatomic,copy) NSString *documentPath;
|
|
@property (nonatomic,copy) NSString *documentPath;
|
|
|
|
|
|
|
|
-@property (nonatomic,assign) NSInteger offset;
|
|
|
|
|
-@property (nonatomic,strong) NSDictionary *params;
|
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *w_constraint;
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *w_constraint;
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *h_constraint;
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *h_constraint;
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *trail_constraint;
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *trail_constraint;
|
|
@@ -99,7 +97,7 @@ static const int delta = 25;
|
|
|
[self loadContent];
|
|
[self loadContent];
|
|
|
|
|
|
|
|
|
|
|
|
|
- self.tableview.tableHeaderView = [self get_tableHeader];
|
|
|
|
|
|
|
+// self.tableview.tableHeaderView = [self get_tableHeader];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-(void)cellDoubleTapAction:(UIGestureRecognizer*)gestureRecognizer
|
|
-(void)cellDoubleTapAction:(UIGestureRecognizer*)gestureRecognizer
|
|
@@ -686,11 +684,37 @@ static const int delta = 25;
|
|
|
#pragma mark - Private
|
|
#pragma mark - Private
|
|
|
|
|
|
|
|
- (void)setupTableRefreshView {
|
|
- (void)setupTableRefreshView {
|
|
|
|
|
+
|
|
|
|
|
+ __weak typeof(self) weakSelf = self;
|
|
|
self.tableview.jl_header = [[JLRefreshHeader alloc] init];
|
|
self.tableview.jl_header = [[JLRefreshHeader alloc] init];
|
|
|
self.tableview.jl_header.refreshDelegate = self;
|
|
self.tableview.jl_header.refreshDelegate = self;
|
|
|
|
|
+ self.tableview.jl_header.clear = YES;
|
|
|
|
|
+ self.tableview.jl_header.offsetBlock = ^(CGFloat offset) {
|
|
|
|
|
+ if (offset <= 0) {
|
|
|
|
|
+ weakSelf.header_top_constraint.constant = -offset;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+ self.tableview.jl_header.stateChangeBlock = ^(JLRefreshState state) {
|
|
|
|
|
+
|
|
|
|
|
+ NSString *title = [weakSelf.tableview.jl_header refreshTitleForState:state];
|
|
|
|
|
+ weakSelf.refreshHeaderTitleLb.text = title;
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
self.tableview.jl_footer = [[JLRefreshFooter alloc] init];
|
|
self.tableview.jl_footer = [[JLRefreshFooter alloc] init];
|
|
|
self.tableview.jl_footer.refreshDelegate = self;
|
|
self.tableview.jl_footer.refreshDelegate = self;
|
|
|
|
|
+ self.tableview.jl_footer.clear = YES;
|
|
|
|
|
+ self.tableview.jl_footer.offsetBlock = ^(CGFloat offset) {
|
|
|
|
|
+
|
|
|
|
|
+ if (offset <= 0) {
|
|
|
|
|
+ weakSelf.footer_top_constraint.constant = offset;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ self.tableview.jl_footer.stateChangeBlock = ^(JLRefreshState state) {
|
|
|
|
|
+
|
|
|
|
|
+ NSString *title = [weakSelf.tableview.jl_footer refreshTitleForState:state];
|
|
|
|
|
+ weakSelf.refreshFooterTitleLb.text = title;
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (void)setupNavigationBar {
|
|
- (void)setupNavigationBar {
|
|
@@ -932,12 +956,17 @@ static const int delta = 25;
|
|
|
|
|
|
|
|
- (void)jl_pullRefresh:(JLRefreshBasis *)refresh state:(JLRefreshState)state percentage:(float)percentage {
|
|
- (void)jl_pullRefresh:(JLRefreshBasis *)refresh state:(JLRefreshState)state percentage:(float)percentage {
|
|
|
|
|
|
|
|
|
|
+// NSString *title = [refresh refreshTitleForState:state];
|
|
|
|
|
+// CGFloat offset = refresh.jl_height * percentage;
|
|
|
|
|
+
|
|
|
if ([refresh isEqual:self.tableview.jl_header]) {
|
|
if ([refresh isEqual:self.tableview.jl_header]) {
|
|
|
-
|
|
|
|
|
|
|
+// self.refreshHeaderTitleLb.text = title;
|
|
|
|
|
+// self.header_top_constraint.constant = offset;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (refresh == self.tableview.jl_footer) {
|
|
if (refresh == self.tableview.jl_footer) {
|
|
|
-
|
|
|
|
|
|
|
+// self.refreshFooterTitleLb.text = title;
|
|
|
|
|
+// self.footer_top_constraint.constant = -offset;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|