ios7 tableview scrollsToTop 不执行处理方法

时间:2015-05-29 15:24:05   收藏:0   阅读:316

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

原文:http://www.cnblogs.com/programmer-blog/p/4538346.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!