滚动完成后在表视图中显示行的完整部分
我有表格视图(它有部分)。一次它只会显示 4 个图像/行(表格视图的高度据此设置)。滚动完成后,将照常显示第 5 行半段、第 6 行全段、第 7 行全段、第 8 行全段、第 9 行半段。但是我不想显示任何行的一半部分。滚动功能完成后,我需要在表视图中显示行的完整部分(可能是第 5、6、7、8 行或第 6、7、8、9 行)。有什么办法可以做到这一点吗?tableView有什么属性可以做到这一点吗?
i have table view(it has sections). at a time it will show only 4 images/rows(the height of table View is set according to that). when the scrolling is done, it will display 5th row half section,6th row full, 7th row full ,8th row full , 9th row half section as usual. however i don't want to show the half section of any rows. i need to show the complete sections of rows in my table view(it may be Rows 5,6,7,8 or Rows 6,7,8,9) after my scroll function is done. is any way to do it?any property for tableView to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你应该结合以下方法:
scrollToRowAtIndexPath:atScrollPosition:animated:
滚动接收器,直到索引路径标识的行位于屏幕上的特定位置。
- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition 动画:(BOOL)动画
scrollViewDidEndDragging:willDecelerate:
告诉代理拖动在滚动视图中结束。
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
scrollViewDidEndDecelerating:
告诉代理滚动视图已结束减速滚动运动。
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
I think you should combine next methods:
scrollToRowAtIndexPath:atScrollPosition:animated:
Scrolls the receiver until a row identified by index path is at a particular location on the screen.
- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated
scrollViewDidEndDragging:willDecelerate:
Tells the delegate when dragging ended in the scroll view.
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
scrollViewDidEndDecelerating:
Tells the delegate that the scroll view has ended decelerating the scrolling movement.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView