ios7 tableview scrollsToTop 不执行处理方法

it2022-05-05  170

ios7中调用[self.tableview scrollsToTop] 没有效果(ios8中也没有效果)

stackflow 处理方法:

[self.tableviewscrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];

 

或者implement the UIScrollViewDelegate method scrollViewShouldScrollToTop:

- (BOOL) scrollViewShouldScrollToTop:(UIScrollView*) scrollView { if (scrollView == self.myTableView) { return YES; } else { return NO; } }这个方法没有尝试以上方法参见:http://stackoverflow.com/questions/19059024/cant-get-scrollstotop-working-on-ios7

转载于:https://www.cnblogs.com/programmer-blog/p/4538346.html


最新回复(0)