gpt4 book ai didi

ios - 如何隐藏 UITableView 空行,swift

转载 作者:行者123 更新时间:2023-11-28 11:13:16 24 4
gpt4 key购买 nike

我怎样才能从这些行中隐藏 UITableView 的行,什么是不使用的。例如,看截图:

enter image description here

我可以只显示 4 行并隐藏其他未使用的行吗?所以,我只显示 4 行,然后是白屏,而不是现在的行

最佳答案

喜欢将 tableFooterView 框架设置为 CGRectZero on viewDidLoad

override func viewDidLoad() {

super.viewDidLoad()

// set as your tableFooterView frame as CGRectZero it hides the empty rows
self.tableView.tableFooterView = UIView(frame: CGRectZero)

self.tableView.backgroundColor = UIColor.clearColor()

}

关于ios - 如何隐藏 UITableView 空行,swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33666358/

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