iOS中tab bar图标、APP 图标等各种图标的尺寸标准

来自 Apple 的官方文档

Every app needs an app icon and a launch file or image. In addition, some apps need custom icons to represent app-specific content, functions, or modes in navigation bars, toolbars, and tab bars.

Unlike other custom artwork in your app, the icons and images listed in Table 41-1 must meet specific criteria so that iOS can display them properly. In addition, some icon and image files have naming requirements (to learn about naming these files, see App Icons and App Launch (Default) Images).

Table 41-1Size (in pixels) of custom icons and images

Asset

iPhone 6 Plus (@3x)

iPhone 6 and iPhone 5 (@2x)

iPhone 4s (@2x)

iPad and iPad mini (@2x)

iPad 2 and iPad mini (@1x)

App icon (required for all apps)

180 x 180

120 x 120

120 x 120

152 x 152

76 x 76

App icon for the App Store (required for all apps)

1024 x 1024

1024 x 1024

1024 x 1024

1024 x 1024

1024 x 1024

Launch file or image (required for all apps)

Use a launch file (see Launch Images)

For iPhone 6, use a launch file (see Launch Images)

For iPhone 5, 640 x 1136

640 x 960

1536 x 2048 (portrait)

2048 x 1536 (landscape)

768 x 1024 (portrait)

1024 x 768 (landscape)

Spotlight search results icon (recommended)

120 x 120

80 x 80

80 x 80

80 x 80

40 x 40

Settings icon (recommended)

87 x 87

58 x 58

58 x 58

58 x 58

29 x 29

Toolbar and navigation bar icon (optional)

About 66 x 66

About 44 x 44

About 44 x 44

About 44 x 44

About 22 x 22

Tab bar icon (optional)

About 75 x 75 (maximum: 144 x 96)

About 50 x 50 (maximum: 96 x 64)

About 50 x 50 (maximum: 96 x 64)

About 50 x 50 (maximum: 96 x 64)

About 25 x 25 (maximum: 48 x 32)

Default Newsstand cover icon for the App Store (required for Newsstand apps)

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 1024 pixels on the longest edge

At least 512 pixels on the longest edge

Web clip icon (recommended for web apps and websites)

180 x 180

120 x 120

120 x 120

152 x 152

76 x 76

For all images and icons, the PNG format is recommended. You should avoid using interlaced PNGs.

The standard bit depth for icons and images is 24 bits—that is, 8 bits each for red, green, and blue—plus an 8-bit alpha channel.

You don’t need to constrain your palette to web-safe colors.

IOS界面元素的尺寸以及屏幕尺寸

fourPhones

How to detect the current device size and kind

Element iPhone 4S (and earlier) iPhone 5 iPhone 6 iPhone 6 Plus
Window (including status bar area) 320 x 480 pts 320 x 568 pts 375 x 667 pts 414 x 736 pts
iOS8 Portrait Keyboard (English)
with QuickType
320 x 253 pts 320 x 253 pts 375 x 258 pts 414 x 271 pts
iOS8 Portrait Keyboard (English)
without QuickType
320 x 224 pts 320 x 224 pts 375 x 225 pts 414 x 236 pts
iOS8 Landscape Keyboard (English)
with QuickType
480 x 193 pts 568 x 193 pts 667 x 194 pts 736 x 194 pts
iOS8 Landscape Keyboard (English)
without QuickType
480 x 170 pts 568 x 170 pts 667 x 171 pts 736 x 171 pts
Launch Image Sizes 640 x 960 pixels 640 x 1136 pixels 750 x 1334 (@2x) portrait
1334 x 750 (@2x) landscape
1242 x 2208 (@3x) portrait
2208 x 1242 (@3x) landscape
This page is available as an interactive version in the idev101 app!

Other dimensions common to all screen sizes:

Status Bar
(How to hide the status bar)
20 pts
Navigation Bar 44 pts
Nav Bar/Toolbar Icon white icon – up to 20 x 20 pts (transparent PNG)
Tab Bar 49 pts
Tab Bar Icon up to 30 x 30 pts (transparent PNGs)
Text Field 31 pts

Points vs. Pixels

Apple introduced retina displays starting with the iPhone 4. You don’t have to modify your code to support high-res displays; the iOS coordinate system uses points rather than pixels, so the dimensions and position in points of all UI elements remains the same across all devices.

iOS supports high resolution displays via the scale property on UIScreen, UIView, UIImage, and CALayer classes. If you load an image from a file whose name includes the @2x modifier, its scale property is set to 2.0. Similarly an image with a @3x modifier has a scale of 3.0. Otherwise the scale defaults to 1.0.

Retina Graphics

To support high-resolution graphics on devices with retina displays, create two versions of the image: a standard size image, and a double-sized image with “@2x” added to the name:

Standard Size: High Resolution:
homeSmall
button.png
60 x 20
homeBig
button@2x.png
120 x 40

To refer to an image in your code (or in Interface Builder), use the filename of the standard sized image. iOS will automatically detect and use the @2x version if the device supports it:

Xcode中屏蔽某个源文件的全部编译警告信息

某些时候如果我们的源码在编译过程中出现大量的编译警告时,看起来是挺不爽的;但又确实没办法解决警告问题的时候,我们可以使用下面的方法来屏蔽指定的某个文件的所有警告信息。

1、在Xcode中选中工程文件。

2、在右边面板中选中“Build Phases”。

3、展开“Compile Sources”。

4、在需要屏蔽警告的源文件一行中双击“Compiler F lags”。

5、在弹出窗口中输入-w

1366815659_7884

局域网内电脑互相PING不通、无法连接共享打印机、无法文件共享的解决办法

自从网络诞生以来,这就是个永恒的话题,ahe几乎每天都能碰到类似问题或者接到关于局域网连通方面问题的求助电话,现在就常见的几种状况做下说明,希望对各位有所启发。

局域网联机故障,无非表现在以下几个方面:

1、PING不通网关或路由;

这个检查机器的网卡驱动或者网线连接以及路由器设置吧,常见的问题,除了连线故障外,不外乎TCP/IP设置不当,路由器没有DHCP功能而电脑又没有设置IP等;这种问题解决起来比较简单,如果同一局域网里有其它电脑连接,就可以根据情况判断是路由问题还是电脑本身问题了。

如果是电脑本身问题,有时候在设备管理器中删除网卡,重新安装驱动可以起到意想不到效果;

还有一种可能是主板内置网卡了,而又外接了一个网卡,可能存在冲突,去CMOS里禁用掉内置网卡即可;

2、两台电脑可以互相PING,但无法访问共享文件或者打印机

依次检查:

两台电脑是否在相同工作组?

如果用机器名无法共享,试试IP,比如我的电脑或者开始运行中直接输入 \\192.168.1.88(被共享者IP地址)

电脑是不是开启了文件和打印机共享?

如果是跨平台文件共享,比如Ubuntu和Windows,是否安装了合适的共享协议?

如果被共享的机器是WIN7,ADMINISTRATOR用户密码不能为空,否则不能共享;

新版本的系统,关掉了guest共享,尝试在被共享的机器上开一个用户名并设置密码,同时将待共享的资源设置合理的共享权限;XP共享WIN7或者更高版本系统时经常会遇到这种情况;

3、电脑ping网关或者路由器能通,但是互相ping不通

这个问题主要出现在路由或者网关设置上面。

常见的新款路由器比如D-LINK、TP-LINK等,在路由器的无线设置或者局域网设置选项中,有诸如 AP隔离模式、客户端隔离模式、Client isolation等选项(各个品牌和型号路由器说法不同),将这个选项关掉并重启路由器即可解决问题。

JavaScript 和 Flash的交互

最近整理了一下JS与Flash交互的一些常见问题,现总结一下分享给大家。

内容大纲:

1. 在页面中嵌入SWF文件

2. JS与SWF的通讯方式

3. 常见问题与解决方法

第一部分:在页面中嵌入SWF文件

既然是Flash与JS的交互那肯定与他们的共同载体Web页面脱不了干系,也就是我们第一节的内容;

我们先来看一看Flash文件是以什么样的方式出现在HTML页面当中的。

Continue reading

  • fafsdsadsadsadas