美文网首页
2018-06-22 解决IOS UITableView 滑不到

2018-06-22 解决IOS UITableView 滑不到

作者: chengs | 来源:发表于2018-06-22 17:56 被阅读48次

今天,碰到坑爹的问题,就是在4.7或者以下的设备上,出现 UITableView 滑不到最底部,总是滑下去回弹到如图,  一直以为是适配和foot的高度问题.

滑动到最底部回弹

解决办法:

1.将UITableView的高度减去底部TabBar的高度

UITableView *_tableView = [[UITableView alloc]

initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT-self.tabBarController.tabBar.frame.size.height)

style:UITableViewStyleGrouped];

2.改变UITableView的滑动视图范围

_tableView.contentInset = UIEdgeInsetsMake(0, 0, self.tabBarController.tabBar.frame.size.height, 0);

self.tabBarController.tabBar.frame.size.height 可根据具体需求自行修改。

滑动到最底部 解决!!!

好了,解决!  记录下

相关文章

网友评论

      本文标题:2018-06-22 解决IOS UITableView 滑不到

      本文链接:https://www.haomeiwen.com/subject/syflyftx.html