IOS Swift,在表格底部显示文本字段

标签 ios swift swift2

我正在做聊天屏幕,因为我想在表格底部添加我的文本字段。 我使用了表格的页脚,但问题是如果表格高度较小,则页脚不会出现在屏幕底部。如下所示。

enter image description here

最佳答案

为什么要使用表格 View 的页脚?有什么具体原因吗?

处理此问题的最佳方法是在 Storyboard中使用 UITableViewController,并将其作为容器 View 嵌入到 UIViewController 中。然后你可以使用自动布局来设置页脚和包含 UITableView 的容器 View 之间的关系。

原始答案:

tableFooterView property doesn't fix the footer at the bottom of the table view

UITableView, make footer stay at bottom of screen?

关于IOS Swift,在表格底部显示文本字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33839749/

相关文章:

objective-c - 如何让我的 iAd 横幅显示在屏幕底部?

ios - 详细说明 UISplitViewController 中的 UINavigationController 问题

ios - 在 iOS-Charts (Xcode 7.3.1) 中设置 X 轴和 Y 轴时出错

ios - 动态检测 UIScrollView 的高度

Swift 协议(protocol)实现 Equatable

html - 将文本粘贴到 UIWebView/网站

ios - 'Int' 与 'String.Index' 不同

iOS Swift 多维数组 - 编译需要很长时间。我应该改变什么?

ios - swift 中 UILabel 的彩色动画

ios - Spritekit Swift 游戏菜单放大屏幕