gpt4 book ai didi

ios - 当键盘出现时,如何阻止 tableView 外部的标题消失

转载 作者:行者123 更新时间:2023-11-30 12:22:24 25 4
gpt4 key购买 nike

所以在我的一生中,我无法弄清楚当键盘弹出时如何阻止标题滚动到屏幕之外。

Without keyboard engaged - header is where it should be | With keyboard engaged - header disappears

My hierarchy

这看起来应该是一个很容易解决的问题,但我已经尝试过很多不同的布局设置和约束,但我就是无法弄清楚。有人对我如何完成这项工作有一些建议吗?

最佳答案

通过在 viewForHeaderInSection 方法中返回第 0 节的 View 来代替 TableHeader 将其作为节标题...这可以解决您的问题。

关于ios - 当键盘出现时,如何阻止 tableView 外部的标题消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44637251/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com