_嵌入式开发_

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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
posted on 2015-05-29 13:51  _嵌入式开发_  阅读(1276)  评论(0编辑  收藏  举报