gpt4 book ai didi

iphone - UIViewController背景图片

转载 作者:行者123 更新时间:2023-12-03 18:25:20 24 4
gpt4 key购买 nike

如何设置 UIViewController 的背景图像?执行此操作的代码是什么?现在我有

self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.jpg"]];

但我不需要模式。我希望它能正确填满屏幕。

最佳答案

你可以使用:

UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Blah.png"]];

[self.view addSubview:backgroundImage];
[self.view sendSubviewToBack:backgroundImage];
[backgroundImage release];

Apple HD image Guide

关于iphone - UIViewController背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3478908/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com