简体   繁体   English

iPhone-如何创建带纹理的背景

[英]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.

相关问题 如何在OpenGL ES 1.1(iPhone)中以编程方式淡化纹理对象 - How to programmatically alpha fade a textured object in OpenGL ES 1.1 (iPhone) iPhone:如何创建始终在后台运行的线程? - iPhone:How to create thread running in the background always? 如何在iPhone中的UISegmented控件中创建纯背景 - How to create a plain background in UISegmented Control in iPhone 如何在Android之类的iPhone中创建后台服务? - How to create Background Services in iPhone like Android? 如何创建app作为后台守护进程,没有前端越狱iPhone - how to create app working as background daemon with no front end for jailbreak iPhone (iphone)如何从后台线程中创建的imageRef创建UIImage? - (iphone) How to create UIImage from imageRef which is created in background thread? iPhone开发:如何为UIActionSheet创建彩色或半透明背景? - iPhone development: How to create colored or translucent background for UIActionSheet? 如何创建具有背景和旋转图像的iPhone应用程序? - How do I create an iPhone app with background and rotating images? uiscrollview带纹理的背景在帧动画后被压缩 - uiscrollview textured background is compressed after frame animation 通过在后台线程 - iPhone上呈现UIWebView来创建UIImage - Create a UIImage by rendering UIWebView on a background thread - iPhone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM