|
|
@@ -84,6 +84,15 @@ CGFloat const JLRefreshFooterHeight = 30;
|
|
|
|
|
|
}
|
|
|
|
|
|
+- (void)updateTop {
|
|
|
+
|
|
|
+ if (self.scrollView.jl_ContentHeight > self.scrollView.jl_height) {
|
|
|
+ self.jl_y = self.scrollView.jl_ContentHeight ;
|
|
|
+ } else {
|
|
|
+ self.jl_y = self.scrollView.jl_height;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
- (void)willMoveToSuperview:(UIView *)newSuperview {
|
|
|
|
|
|
[super willMoveToSuperview:newSuperview];
|
|
|
@@ -93,8 +102,10 @@ CGFloat const JLRefreshFooterHeight = 30;
|
|
|
self.scrollView.jl_insetBottom += self.jl_height;
|
|
|
|
|
|
// self.jl_y = self.scrollView.jl_ContentHeight;
|
|
|
+
|
|
|
// 设置位置
|
|
|
- self.jl_y = (((int)(self.scrollView.jl_ContentHeight / self.scrollView.jl_height)) + 1) * self.scrollView.jl_height;
|
|
|
+ [self updateTop];
|
|
|
+
|
|
|
|
|
|
} else { // remove
|
|
|
|
|
|
@@ -110,13 +121,7 @@ CGFloat const JLRefreshFooterHeight = 30;
|
|
|
|
|
|
// self.jl_y = self.scrollView.jl_ContentHeight;
|
|
|
// 设置位置
|
|
|
-// if (self.scrollView.jl_ContentHeight >= self.scrollView.jl_height) {
|
|
|
-// self.jl_y = self.scrollView.jl_ContentHeight;
|
|
|
-// } else {
|
|
|
-// self.jl_y = self.scrollView.jl_height;
|
|
|
-// }
|
|
|
-
|
|
|
- self.jl_y = (((int)(self.scrollView.jl_ContentHeight / self.scrollView.jl_height)) + 1) * self.scrollView.jl_height;
|
|
|
+ [self updateTop];
|
|
|
|
|
|
if (self.offsetBlock) {
|
|
|
self.offsetBlock(0);
|