0

当我设置 UIView 的背景图像时

[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"mainScreenBackground" ofType:@"png"]]]];

它需要 6 MB 的内存。我想要另一种占用更少内存的方法。

4

1 回答 1

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

Does this work??

于 2012-04-27T09:31:47.947 回答