SHN
SHN

Reputation: 795

Icon assets vs. icon code

I am working on an app which has lot of images and graphics. There are instances where I need to re-use the icons, images etc to change color using the image rendering capability of Xcode. Inspite all of my best efforts the size of my app huge. I also looked into the PaintCode approach to move the icon images from assets to code. But I am wondering will it be good idea to move the efforts from compile time to run time? Will it not burden the app too mutch and affect the application's performance? With PaintCode gaining reputation in the market I am sure this would have been discussed somewhere.

Upvotes: 0

Views: 187

Answers (2)

matt
matt

Reputation: 535925

It's not an either-or thing. You can generate an image in code and then save it for later use. (For example, you could generate it and save the resulting image to disk, where it will take up no app memory unless and until it is actually needed.)

Upvotes: 0

Andrew Bogaevskyi
Andrew Bogaevskyi

Reputation: 2635

I use a PaintCode approach in my project and performance is good. But I don't have many icons on the screen and do not draw many images at the same time. You could improve performance if needed using cache for generated images (Don't forget to clean it when didReceiveMemoryWarning calls).

If you have many images which depends of screen resolution you could also try to use.

Upvotes: 2

Related Questions