Is there a trick to save time building in Xcode when there are thousands of images?

前端 未结 1 1875
攒了一身酷
攒了一身酷 2021-01-14 07:32

For testing the capabilities of an animation class I have created 5000 fullscreen images with 100kb size each. I added just 1000 of them to my project and Xcode is already b

相关标签:
1条回答
  • 2021-01-14 07:44

    Add the build setting IPHONE_OPTIMIZE_OPTIONS=-skip-PNGs to any target that doesn't want the PNGs modified. Here's how:

    Go to your projects build settings.

    In the lower left hand corner is a menu you icon that looks like a GEAR

    Choose Add User-Defined Setting

    Name the setting: IPHONE_OPTIMIZE_OPTIONS

    Set the Value to: -skip-PNGs

    Do a clean build and your good to go

    The idea is to do this only after you've compiled your code once. This way, the images are correctly processed once, and then you don't need XCode to do it any longer. Credits go to this site.

    0 讨论(0)
提交回复
热议问题