wForFooterInSection粘在UITableView

wForFooterInSection粘在UITableView

本文介绍了iOS - viewForFooterInSection粘在UITableView的底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UITableView 3节。他们每个都有一个页脚,我已经添加使用viewForFooterInSection。我遇到的问题是,当我向下滚动tableview,页脚粘在屏幕的底部,不像其他单元格滚动。有谁知道如何使它,所以脚步几乎像一个单元格,并滚动与表的其余部分?谢谢!

I have a UITableView with 3 sections. Each of them have a footer that I've added using viewForFooterInSection. The problem I'm having is that when I scroll the tableview down, the footer sticks to the bottom of the screen, and doesn't scroll like the rest of the cells. Does anyone know how to make it so the footer almost acts like a cell, and scrolls along with the rest of the table? Thanks!

推荐答案

我确实想出来了。也许不是最聪明的方式做到这一点,但我改变了我的UITableView风格分组,并固定它。我不得不调整TableView有点,所以单元格看起来一样,因为他们没有分组(清晰的背景,没有分隔符),但它工作正常。页脚不再粘贴到TableView的底部。

I actually figured it out. Probably isn't the smartest way to do it, but I changed my UITableView style to grouped, and that fixed it. I had to tweak the TableView a bit so the cells would look the same as they did non-grouped (clear background, no separators), but it worked fine. The footer no longer sticks to the bottom of the TableView.

这篇关于iOS - viewForFooterInSection粘在UITableView的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:39