删除 UITableViewCell 上的顶部灰线 [英] Remove top gray line on UITableViewCell

查看:31
本文介绍了删除 UITableViewCell 上的顶部灰线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UITableViewCell,我想删除它顶部的灰线.我该怎么做?

I have a UITableViewCell and I want to remove the gray line on the top of it. How can I do this?

推荐答案

对我来说,这似乎是图像平铺的问题.我正在平铺一个 320x480 的图像,顶部的中断处有一条灰线,距离顶部 480 像素.我正在这样设置我的背景:

For me, it seems to be a problem with the image tiling. I'm tiling a 320x480 image and there is a gray line at the break at the top as well as 480 pixels from the top. I'm setting my background like this:

self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mybackground.png"]];

self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mybackground.png"]];

裁剪图像似乎去除了灰线,所以我认为这与图像本身有关.

Cropping the image seemed to remove the gray line so I think it had something to do with the image itself.

这篇关于删除 UITableViewCell 上的顶部灰线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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