我有一个使用 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 就在那里。 我不知道如何解决这个问题,非常感谢任何帮助。
谢谢
最佳答案
您需要将 subview 发送到后面:
[self.view sendSubviewToBack:myImage];
关于iphone - 使用 CGRect 显示的图像遮盖了 UIButtons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3622800/