[英]iPhone - how to create a Textured Background
In the Interface Builder (xCode/Mac) I would like to set a Textured Background color. 在界面生成器(xCode / Mac)中,我想设置带纹理的背景色。 How can I add a texture (image) so I'll be able to use a new custom background?
如何添加纹理(图像),以便能够使用新的自定义背景?
I know I can set the background like this: 我知道我可以这样设置背景:
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"table_bg.png"]];
}
How can I do this with the Interface Builder? 如何使用Interface Builder做到这一点?
You can't use your own UIImage's as a background pattern in Interface Builder but you can use the ones built in 您不能在Interface Builder中将自己的UIImage用作背景图案,但可以使用内置的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.