您的位置:首页 > 产品设计 > UI/UE

UITabBarController:tab bar 的 image 太大、不清晰的解决方法

2016-08-16 00:59 495 查看
在设置tab bar 的 image 的时候,直接使用60x60px的图标,出现图标过大的问题,查了一下有人说tab bar 需要 30x30 的image ,试了一下,但效果不理想,图片模糊不清晰,重新查找找到解决方法:

Keep 60x60px icons but rename them as iconName@2x.png which iOS will automatically reduce to 30x30 points, roughly to half of the original size on retina devices.

If you are using assets catalogue, please make sure your icons are set to 2x icon sets.

继续使用像素60x60的图标,但需要命名为 iconName@2x.png, 这样命名iOS将自动将图片将为 30x30 points,变为原来一半大小来适应视网膜屏幕的设备。

如果你使用了 assets catalogue,请确保设置 2x 的icon。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息