原文见这里

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

Asset Catalogs

 

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

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

Asset Catalogs

 

一个工程里可以有多个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的创新无处不在。

相关文章:

  • 2022-12-23
  • 2022-01-02
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-10-13
  • 2021-11-20
  • 2021-08-13
  • 2021-07-18
  • 2021-08-15
  • 2021-12-10
  • 2022-02-23
相关资源
相似解决方案