开发者

iPhone - how to create a Textured Background

开发者 https://www.devze.com 2023-02-06 20:59 出处:网络
In the Interface Builder (xCode/Mac) I would like to set a Textured Background color. How can I add a texture (image) so I\'ll be able to use a new custom background?

In the Interface Builder (xCode/Mac) I would like to set a Textured Background color. 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 {开发者_StackOverflow
    [super viewDidLoad];
    self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"table_bg.png"]];
}

How can I do this with the 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

iPhone - how to create a Textured Background

iPhone - how to create a Textured Background

0

精彩评论

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