本文介绍了swift 3 ios tableview 按单元滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个 tableview,它按预期正常工作.但是,我想改变滚动方式,用户一次只能滚动一个单元格,这样,单元格永远不会被切成两半.
I created a tableview and it works normally as intended. However, I would like to change the scrolling such a way where the user can only scroll one cell at a time so that, there is never a time where the cell is cut in half..
这是一个例子:imgur/ffmk0jP
所以基本上我不希望默认滚动..我希望它一次滚动一个单元格以始终保持原始状态的视图..
So basically i do not want the default scrolling.. i would like it to be scrolled one cell at a time to constantly remain with the view of the original state..
有办法吗?
推荐答案这个怎么样?
scrollToNearestSelectedRowAtScrollPosition:animated:?
tableview scrollRectToVisible:CGRectMake(0, 0, 1, 1) 动画:NO];
更多推荐
swift 3 ios tableview 按单元滚动
发布评论