iOS7 Tabbar图标太大 [英] iOS7 Tabbar icons too big

查看:57
本文介绍了iOS7 Tabbar图标太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎我在处理诸如图标之类的简单内容时遇到了困难.

我仅在为iOS7构建应用程序,因此设备是视网膜显示器(iPad 2除外).因此,我为我的标签栏制作了60 x 60的图标.但是这些太大了. 30 x 30有点像素化.

这是一个60 x 60的图标的样子:

有人可以告诉我为什么会这样吗?

解决方案

保留60x60px的图标,但将其重命名为iconName@2x.png,iOS会自动将其缩小到30x30点,大约是视网膜设备上原始大小的一半. /p>

如果您正在使用资产目录,请确保将图标设置为2x图标集.

Seems I am having difficulty with something as simple as icons.

I am building an app for iOS7 only and thus, devices are retina displays (excluding iPad 2). So I made up some 60 x 60 icons for my tabbar. However these are just too big. And 30 x 30 is a little pixelated.

Here is what a 60 x 60 icon looks like:

Can someone tell me why this is happening?

解决方案

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.

这篇关于iOS7 Tabbar图标太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆