4 ms·
We have moved to PDF assets for all of our apps. It's wonderful. Generally we have a single illustrator file, some export scripts, and push the resulting PDFs
by interpol_p 12y ago
We have moved to PDF assets for all of our apps. It's wonderful.
Generally we have a single illustrator file, some export scripts, and push the resulting PDFs through ShrinkIt to minimise file size.
The result is tiny apps that handle all scale factors, can easily be tinted programmatically, and generally match the aesthetic of iOS 7 and 8.
- kalleboo 12y agoWe're looking at moving to PDF when we adapt to fit the iPhone 6 Plus and I'd be interested to hear if you guys ran into any snags along the way or if it was all smooth sailing?
- interpol_p 12y agoIt's been very smooth for us. We use UIImage+PDF to load and cache assets. The only issue is that you can't use PDFs directly in Xibs or Storyboards — you'll have to load them in code. I'd recommend creating all your assets on non-retina sized artboards in Illustrator. We wrote a simple script to export all artboards to separate PDFs, using the name of the artboard as the file name.
- pbnjay 12y agoWow I had not stumbled across this idea yet... Are there any caveats or downsides to PDF over PNG? (other than xib/storyboard issues you mention)
- interpol_p 12y agoNone that we have encountered. And we've done quite a few apps like this. I'd highly recommend ShrinkIt for shrinking the Illustrator exported PDFs, as it can reduce the size by as much as a factor of 10. Also PDFs really lend themselves to being dynamically tinted. You can use the new render mode in iOS 7+ or something like UIImage+Tint to make sure your key colours are all well defined in your code. (It's really nice when a client suddenly decides they want their app to be orange instead of blue, and it's a one-line change without touching a single asset.)