码迷,mamicode.com
首页 > 移动开发 > 详细

ios7 tableview scrollsToTop 不执行处理方法

时间:2015-05-29 15:26:16      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

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

ios7 tableview scrollsToTop 不执行处理方法

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!