Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/44.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 分组表单元格中的奇怪背景_Iphone_Objective C_Uitableview_Background Color - Fatal编程技术网

Iphone 分组表单元格中的奇怪背景

Iphone 分组表单元格中的奇怪背景,iphone,objective-c,uitableview,background-color,Iphone,Objective C,Uitableview,Background Color,我们在分组表视图中的应用程序单元格中使用按钮。因此,我们设置了一个背景图像,使细胞看起来像按钮。我们使用了以下代码: cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_gradient_mainmenu_2.png"]]; cell.textLabel.textColor = [UIColor whiteColor]; cell.textLabel.highlightedTextColor

我们在分组表视图中的应用程序单元格中使用按钮。因此,我们设置了一个背景图像,使细胞看起来像按钮。我们使用了以下代码:

cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_gradient_mainmenu_2.png"]];
cell.textLabel.textColor = [UIColor whiteColor];
cell.textLabel.highlightedTextColor = [UIColor whiteColor];
看起来像这样

现在奇怪的是,它只适用于具有不同操作系统的一些设备。它在新的iPhone4上肯定不起作用


有人知道如何解决这个问题吗?

对于iPhone4,您可以设置背景视图。
使用表格单元格背景时,组表格的行为不稳定

它看起来像张贴的图像。左侧和右侧奇怪的背景间隙不应该存在