简体   繁体   English

iPhone 4标签栏图标

[英]iPhone 4 Tab Bar Icons

I'm having some issues getting high resolution tab bar icons displaying correctly for iPhone 4. Basically I'm using the Apple guidelines of 96 x 64 for high resolution icons, but when I do this, my icon looks like it is being scaled many times in the tab bar icon area and only part of the icon appears. 我有一些问题让iPhone 4正确显示高分辨率标签栏图标。基本上我使用96 x 64的Apple指南用于高分辨率图标,但是当我这样做时,我的图标看起来像是缩放很多标签栏图标区域中的时间,仅显示部分图标。 If I set the icon size to 30 x 30, the icon displays correctly in terms of proportions but is not sharp because of the higher resolution of the iPhone 4 display. 如果我将图标大小设置为30 x 30,则图标会按比例正确显示,但由于iPhone 4显示屏的分辨率较高,因此图标不清晰。

I've tried other sizes like 64x64 and 60x60 but I get similar problems. 我尝试过64x64和60x60等其他尺寸,但我遇到了类似的问题。

Any ideas? 有任何想法吗?

you have to add @2x to youre iPhone 4 image.. 你必须将@ 2x添加到你的iPhone 4图像..

So if you have a 30x30 image named image.png, make a 60x60 version and name it image@2x.png.. 因此,如果您有一个名为image.png的30x30图像,请制作一个60x60版本并将其命名为image@2x.png ..

You have to name your icon file with @2x! 你必须用@ 2x命名你的图标文件! But in the attributes inspector you have to fulfill the field "Image" taking off the @2x on the file name: 但是在属性检查器中,您必须完成“Image”字段,取消文件名上的@ 2x:

example: 例:
Original file name:"icone@2x.png" 原文件名:“icone@2x.png”
Image field: "icone.png" 图片字段:“icone.png”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM