uitableview的隐藏标题
我有带有隐形标头的TableView。我已经尝试以下未能以:
tableview.tableheaderview = .init(帧:cgRect(x:0,y:0,width:0,height:0))
tableview。 ?。
tableheaderview
https://youtu.be/lnhqn8wvxnk“ rel =“ nofollow noreferrer”>这是一个示例
,所以这是一个错误,还是我错过了某些东西?
I have TableView with invisible header. I already tried unsuccessfully to hide the header with:
tableView.tableHeaderView = .init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
tableView.tableHeaderView?.removeFromSuperview()
tableView.tableHeaderView = nil
But I found out that if you call a multitask or manually change the theme to dark/light, this header disappears
So, is this a bug, or I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
该代码正常工作
This code works perfectly
您也可以为表标头尝试一下
,如果您想隐藏截面的标题,则可以使用以下桌面委托方法来实现。
You can try this for table header
Also if you want to hide header for section then you can achieve with below tableview delegate methods.
您可以不用框架使用
You can use without frame
这对我有用
也 this 将在单行中使用[@getMemd的答案]
This Works For me
also this will work in single line [answer by @getmemd]