开发者

Image displayed using CGRect is obscuring UIButtons

开发者 https://www.devze.com 2023-01-14 17:18 出处:网络
I ha开发者_如何学Cve an image displayed using CGRect (code below). the problem is that it\'s obscuring UIButtons I have in the nib file.

I ha开发者_如何学Cve an image displayed using CGRect (code below). the problem is that it's obscuring UIButtons I have in the nib file.

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];

if I make the CGRect smaller, the UIButtons are there. I can't figure out how to fix this, any help is very appreciated.

thanks


You need to send your subview to the back:

[self.view sendSubviewToBack:myImage];
0

精彩评论

暂无评论...
验证码 换一张
取 消