Przeglądaj źródła

1.修改iOS Apex Driver首页下拉刷新回滚位置不对。

Pen Li 7 lat temu
rodzic
commit
25f1a038f8

+ 2 - 1
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -263,6 +263,7 @@
 }
 
 - (void)refreshControlValueChanged:(UIRefreshControl *)refresh {
+    self.currentIndexPath = nil;
     [self loadData];
 }
 
@@ -407,7 +408,7 @@
                     [strongSelf.homeOrderTableView reloadData];
                     if (strongSelf.currentIndexPath) {
 //                        [strongSelf.homeOrderTableView scrollToRowAtIndexPath:self.currentIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:NO];
-                        [strongSelf.homeOrderTableView selectRowAtIndexPath:self.currentIndexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
+                        [strongSelf.homeOrderTableView selectRowAtIndexPath:strongSelf.currentIndexPath animated:NO scrollPosition:UITableViewScrollPositionMiddle];
                     } else {
                         
                     }