如何删除UITableView的边框? [英] How do I remove the borders of a UITableView?

查看:94
本文介绍了如何删除UITableView的边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经子类化了UITableView控件,风格被分组,但我不需要单元格分隔符。我试图将我的表视图的separatorStyle设置为无,但它不工作。

I have subclassed the UITableView control, and the style is grouped, but I do not need the cell separators. I tried setting my table view's separatorStyle to none, but it doesn't work. Can any one help me out?

推荐答案

在分组表视图中,设置 separatorStyle 不做任何事情。如果你想隐藏它,只需执行以下操作:

In a grouped table view, setting separatorStyle doesn't do anything. If you want to hide it, just do the following:

tableView.separatorColor = [UIColor clearColor];

这篇关于如何删除UITableView的边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆