I'm building a custom table view cell with the Interface Builder. After creating a new view that inherits from UITableViewCell, I get the following .xib
. Right down at the bottom of the view you can see the separator line.
我正在使用Interface Builder构建自定义表格视图单元格。创建一个继承自UITableViewCell的新视图后,我得到以下.xib。在视图底部的右下方,您可以看到分隔线。
After running the app and jumping into the UI debugger, I see two separators for the cells that came out of the UITableViewDataSource methods.
在运行应用程序并跳转到UI调试器之后,我看到两个用于UITableViewDataSource方法的单元格的分隔符。
Obviously this looks weird. Why the duplication? How do I get rid off it?
显然这看起来很奇怪。为什么重复?我该如何摆脱它呢?
Edit 1
Thanks to the suggestion by Shubhank, removing separators from the table view removed the duplicates.
感谢Shubhank的建议,从表格视图中删除分隔符会删除重复项。
1 个解决方案
#1
1
TableWrapperView might be having a custom selector or even the cell xib. Not sure here since i can't see the view details here.
TableWrapperView可能有一个自定义选择器甚至单元格xib。在这里不确定,因为我在这里看不到视图细节。
A simple solution would be to just remove the source UITableView
separators by setting them to none. That way you would have only one selector showing up
一个简单的解决方案是通过将源UITableView分隔符设置为none来删除它们。那样你只会出现一个选择器
#1
1
TableWrapperView might be having a custom selector or even the cell xib. Not sure here since i can't see the view details here.
TableWrapperView可能有一个自定义选择器甚至单元格xib。在这里不确定,因为我在这里看不到视图细节。
A simple solution would be to just remove the source UITableView
separators by setting them to none. That way you would have only one selector showing up
一个简单的解决方案是通过将源UITableView分隔符设置为none来删除它们。那样你只会出现一个选择器