简体   繁体   English

尝试添加背景时,侧面带有灰线的UITableView。 您如何摆脱这些限制?

[英]UITableView with grey lines on the side when trying to add a background. How do you get rid of these lines?

You can see the lines on the side of the table http://img267.imageshack.us/img267/7098/screenshot20100808at543.png 您可以在表格的侧面看到线条http://img267.imageshack.us/img267/7098/screenshot20100808at543.png

How do you get rid of these lines on the side of the table? 您如何摆脱桌子侧面的这些线?

The problem is not in the lines. 问题不在于线。
The problem is in the labels' background color. 问题出在标签的背景颜色上。
Just set the background color (.backgroundColor property) of the label (the one that contains the text "Item 1", "Item 2" etc.) to [UIColor clearColor] inside the cellForRowAtIndexPath method. 只需在cellForRowAtIndexPath方法内将标签(包含文本“ Item 1”,“ Item 2”等的标签)的背景色设置为[UIColor clearColor]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM