如何停止UITableView在顶部和底部的滚动? [英] How can I stop the UITableView over scroll at the top and bottom?

查看:82
本文介绍了如何停止UITableView在顶部和底部的滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将UITableViewUITableViewCells一起使用,并且我想停止在列表顶部和底部获得的"over"滚动,可以在最上方的单元格上向下拖动以显示该位背景(有时用于刷新)有什么方法可以使单元格的顶部边缘成为绝对顶部"吗?所以视图只显示单元格?

I am using a UITableView with UITableViewCells and I want to stop the "over" scroll that you get at the top and bottom of the list, The bit where you can pull down on the very top cell to show the background (sometimes used to refresh) Is there anyway to just make the top edge of the cell the "absolute top"? so the view only ever shows just the cells?

推荐答案

由于UITableView是UIScrollview的子类,因此只需将'bounces'属性设置为NO就足够了.

Since UITableView is a subclass of UIScrollview, it should suffice to just set the 'bounces' property to NO.

您可能还需要将"alwaysBounceVertical"设置为否" ...

you probably need to set'alwaysBounceVertical' to NO, too...

这篇关于如何停止UITableView在顶部和底部的滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆