使用CGRect显示的图像模糊了UIButtons

时间:2010-09-01 23:22:01

标签: iphone uiimageview uiimage

我使用CGRect显示图像(下面的代码)。问题是它掩盖了我在nib文件中的UIButtons。

CGRect myImageRect = CGRectMake(0.0f, 40.0f, 480.0f, 280.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:recipe.image]];
[self.view addSubview:myImage];
[myImage release];

如果我将CGRect缩小,那么UIButton就在那里。 我无法弄清楚如何解决这个问题,非常感谢任何帮助。

感谢

1 个答案:

答案 0 :(得分:4)

您需要将子视图发送到后面:

[self.view sendSubviewToBack:myImage];
相关问题