开发者

iPhone 4 resolution difficulty - @2x naming technique not working for button image

开发者 https://www.devze.com 2023-01-12 08:54 出处:网络
I have a button with an image set through interface builder. The original image is SearchImage.png and the high rez version is SearchImage@2x.png. I\'m absolutely sure that no typos were made, and the

I have a button with an image set through interface builder. The original image is SearchImage.png and the high rez version is SearchImage@2x.png. I'm absolutely sure that no typos were made, and the higher resolution image is indeed开发者_JAVA技巧 exactly twice the size (ie twice as tall, twice as wide) as the lower resolution image, yet the office's iPhone4 still only loads the low resolution image.

Does anyone have any ideas what the problem might be?

I have read all the relevant Apple documentation.

Thanks! Tristan


Just assign the image property "SearchImage.png" and include both SearchImage.png and SearchImage@2x.png in your main bundle and it will load the correct image.

See https://devforums.apple.com/message/233916#233916.

0

精彩评论

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