开发者

Why I can't see the background image in the device, but appears on the simulator?

开发者 https://www.devze.com 2022-12-29 11:05 出处:网络
Here is the viewDidLoad: [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@\"bg.png开发者_C百科\"]]];

Here is the viewDidLoad:

[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png开发者_C百科"]]];

It can show the simulator, but not on the device, why?? thz.


Also check that the image isn't a PSD named with a PNG extension. The Simulator can show PSD images, the device can't. :)


The device is case-sensitive, so make sure you've got bg.png exactly right.

0

精彩评论

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