Sfoglia il codice sorgente

修复 loadMoreButton 和 noMoreLabel 有时同时显示的问题.

feng 10 anni fa
parent
commit
b23036a8e0

+ 1 - 1
MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooter.m

@@ -271,7 +271,7 @@ - (void)setState:(MJRefreshFooterState)state
             
             //修复传统上拉加载更多在 UITableView 使用 '- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;'方法加载更多数据时露出按钮的的问题
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                self.loadMoreButton.hidden = NO;
+                self.loadMoreButton.hidden = self.state != MJRefreshFooterStateIdle;
             });
         }
             break;