Where the design community meets.
Community Staff Founder at Bjango Joined almost 6 years ago via an invitation from Christophe T. Marc has invited Matt Kelsh, Rene Ritchie, Dan V Peterson, Troy Mcilvena, Graham Clarke and 12 others, Jeremy Olson, Ramy M., Andrew Hart, Ricky Synnot, Aen Tan, Justin Velgos, Nik Fletcher, Rok Benedik, Nghia Nguyen, Jared Sinclair, Matt McDaniel, Elliot Jackson
My pleasure. :)
Yep! Great to get the behaviour cleared up so quickly. Excellent stuff.
Great analysis. In my opinion, XD’s approach is wrong, and undesirable.
It’d be good to hear from the XD team, because maybe this is a bug or an unknown difference to them?
Yes. Well, with PNG as the first preference. Here is the relevent section of Apple’s HIG:
Produce artwork in the appropriate format. In general, use de-interlaced PNG files for bitmap/raster artwork. PNG supports transparency and, because it's lossless, compression artifacts don't blur important details or alter colors. It's a good choice for intricate artwork that requires effects like shading, textures, and highlights. Use JPEG for photos. Its compression algorithm usually produces smaller sizes than lossless formats and artifacts are harder to discern in photos. Photo-realistic app icons, however, look best as PNGs. Use PDF for glyphs and other flat, vector artwork that requires high-resolution scaling.
The recommendation is to use PNG for most things, JPEG for photos, and PDFs for glyphs and other flat, vector artwork that requires high-resolution scaling.
However, they don’t mention that PDFs get converted to PNGs by Xcode. In doing so, there can be quality and rendering issues, and the resulting PNGs are almost certainly bigger files than if you just saved PNGs from your design tool.
It is true that some assets may look very similar, but when Xcode renders your PDFs to PNGs, it will use macOS’s PDF rendering, which means even things like shape antialiasing will likely be different to your design tool (Sketch matches the standard macOS shape antialiasing, Figma, Photoshop, Illustrator and Affinity Designer don’t).
The PNGs created from a PDFs are typically far bigger files for a few reasons — if there’s scaling issues, the images will be blurrier, which will increase the number of unique colours. Xcode also uses of PNGCrush to compress PNGs, and that can easily be improved, if you disable it.
The HIG also says:
Use the 8-bit color palette for PNG graphics that don’t require full 24-bit color. Using an 8-bit color palette reduces file size without reducing image quality. This palette is not appropriate for photos.
As far as I am aware, Xcode never does this with PDFs, but if you’re saving or optimising your own PNGs, you can. Indexed PNGs are far smaller than RGBA PNGs.
So, given the files are bigger, and even with very simple solid colour glyphs there can be rendering issues, and your PDFs end up as PNGs in the app bundle anyway… there really isn’t any incentive to use PDFs for iOS assets.
Apple are wrong to recommend PDFs. PDF is a terrible UI asset format, and they should not be using it. You should not be using it. You should recommend to colleagues and clients that PDFs are never used as iOS assets.
What about using PDFs to send a bunch of artboards to someone, so they can review the design? Sure. Go for it.
Yeah, unfortunately. I bet most of the people happy about this feature will use it for iOS assets at some point.
Please, never, ever use PDFs for iOS assets. The format is completely broken for that use, and your app will be larger, with degraded assets as a result.
It’s $5K per person who helps for a one-week, high profile project? Seems like they’re being very upfront about the details, and the time frame also seems pretty locked down. Seems good to me.
This is my take as well.
Would I recommend Affinity Designer? Absolutely. Am I personally going to switch? No way. I do use Affinity Designer for some things, sometimes, but Illustrator is my go-to for most vector design.
Perfect timing for this article: What it takes to be a Product Designer
How do you deal with it?
Lean in to it. Taste is a good thing. :D
Where the design community meets.
Designer News is a large, global community of people working or interested in design and technology.