2012-07-25 17 views
0

我有一个GridViewCell和它的背景我设置为clearColor像这样:持久白色背景虽然我已经将它设置为清除

UIView* mainView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 160, 123)]; 
[mainView setBackgroundColor:[UIColor clearColor]]; 

虽然由于某些原因,背景仍然是白色的。

这是我所看到的:

enter image description here

如果它的任何帮助,我在下面this tutorial

回答

0

大量的试验和错误之后,我想通了,我cellForItemAtIndex方法,我需要设置细胞的backgkround颜色以清除像这样:

[cell setBackgroundColor:[UIColor clearColor]]; 
0

我很确定你看到的是window

在应用程序委托:

[self.window setBackgroundColor:[UIColor redColor]];

,你应该看到所有红色。

+0

如果你使用IB,你也可以在那里改变'window'的'backgroundColor'。 – runmad 2012-07-25 14:58:49

+0

嗯,它没有效果。我已经放置了一张图片供你看。 – 2012-07-25 15:04:15

相关问题