Re:What iPhone 6 screen size means for developers
by kalleboo on Thursday September 11, 2014 @07:58AM
(#8302041)
We'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?
Re:What iPhone 6 screen size means for developers
by interpol_p on Thursday September 11, 2014 @08:43AM
(#8302214)
It'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.
Re:What iPhone 6 screen size means for developers
by pbnjay on Thursday September 11, 2014 @01:24PM
(#8303832)
Wow 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)
Re:What iPhone 6 screen size means for developers
by interpol_p on Thursday September 11, 2014 @07:45PM
(#8305878)
None 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.)
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.