分组 TableView 部分末尾 UITableView 单元格底部的白线 (iOS 5)
我注意到 iOS 5 中表格视图单元格的外观发生了变化,我在 google 上搜索了一下,看看是否有人注意到了。 此人做到了,并发布了此图片。我无法在每个 uitableview 上重现它(如果可以的话,我会知道它来自哪里并且我可以摆脱它),但这肯定给我的一个表视图带来了问题。有没有其他人注意到这一点 - 更好的是,有其他人找到一种方法来摆脱它吗?
I have noticed a change in the look of the tableview cells in iOS 5, and I googles around a bit to see if anyone else had noticed. This fellow did, and posted this image. I can't reproduce it on every uitableview (if I could I would know where it came from and I could get rid of it), but it is certainly causing me a problem on one of my tableviews. Has anyone else noticed this - better yet, has anyone else found a way to get rid of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了这个问题,在 iOS4 手机或模拟器上看起来不错,但对于 iOS5 这是一个问题。我发现问题在于表视图的分隔符样式。看起来 iOS5 的默认值设置为 etched。我已经检查了我的代码,并将以下行添加到所有分组表视图控制器的 init 方法中:
这为我解决了问题,尽管我还设置了以下内容,因为颜色看起来是白色而不是像以前的版本那样的灰色:
这对我来说是一个问题,因为我更改了所有表格视图的背景,并且额外的行对于我的应用程序来说看起来不太好。
I had this issue, on an iOS4 phone or simulator it looks fine but for iOS5 it was a problem. I discovered that the issue was with the separator style for the table view. It looks like the default value is set to etched for iOS5. I have gone through my code and added the following line to my init method for all grouped table view controllers:
Which has fixed the issue for me, although I also set the following as the color appeared to be white not grey as in the previous version:
It was a problem for me as I have changed the background on all of my table views and the extra line didn't look good for my app.
使用:
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
use:
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;