Asset Catalogs

原文见这里

Asset Catalogs用于简化管理程序内用到的图片。每个asset catalog可以包含image set, App Icon, Launch Image和OS X Icon(如图)。

Screen Shot 2013-09-16 at 4.39.14 PM

图片添加可以通过import或者直接从finder里拖拽。

catalog本质是文件夹,其中的子文件夹对应上述的4种类型,子文件内是资源文件和json文件。

Screen Shot 2013-09-16 at 4.41.28 PM

一个工程里可以有多个catalog,但工程只能含有一个App iCon和Launch Image。

catalog里还可以对某一张图片进行切割。因为图片和imageview有可能不是一样的大小,我们可以通过切割来使图片的某一部分按找stretch或tile的方式填充imageView。这个省却API操作,并且直观。

另外Apple还提到:

For projects with a deployment target of iOS 7, Xcode compiles your asset catalogs into a runtime binary file format that reduces the download time for your app

看来,Apple的创新无处不在。

原文地址:https://www.cnblogs.com/scorpiozj/p/3331465.html