Which image format i should for ios development native ? SVG or PNG? Which image format i should for ios development native ? SVG or PNG? ios ios

Which image format i should for ios development native ? SVG or PNG?


Official iOS Dev documentation says "the PNG format is the one most recommended for use in your apps". You can read it for a lot more information here.

  1. Yes, although the supported file types table doesn't list it. Apple values user experience. SVG scaling consumes a few more CPU cycles which they don't like. PNG rendering is more efficient than SVG.
  2. Yes, Apple explicitly recommends using multiple versions of the image at different sizes. Then scaling can be done from the file having the nearest dimensions.
  3. Refer 1. There are cases like zoom-in / out scenarios where SVGs would be better though.

You could use vectorized PDFs alternatively. You can read more here. It isn't without limitations, but with vectorized PDFs, Xcode automatically generates scaled versions. That should make life easier. Note that sometimes the scaled results look quite poor.