9 points · by allsystemsgo · 13y ago · 9 comments
Also don't forget that your design has to be responsive so that it can go from horizontal to vertical. And then keep in mind that if at some later point you want to port to Android that there really aren't any fixed aspect ratios since there are so many devices.
My advice is that you should sketch and then use an app like Keynote to see what your interface looks like on the device. You can be shocked sometimes just how different things feel when you go from a personal computer to a mobile device.
This is why I'm converting an open source app I built to just render everything (using CG, not CALayer) instead of using images. Yeah, images are faster. But I hate to repeat myself and exporting images from photoshop is more time consuming than it seems.
(Edit): Images are usually faster, but that's not entirely true if you use only CG calls on a drawRect. From a memory standpoint, keep in mind that a PNG file will occupy the 'framebuffer' + the original image + all the crap that comes with UIImage. By drawing it yourself, you will burn a little cpu time but than only the result buffer will allocated.
Since you're only using Core Graphics, this is acceptable. Core Graphics only has a CPU implementation on iOS. Core Animation has a CPU implementation that only gets activated under certain conditions; otherwise, it renders through the GPU by default.
If you're planning on using CA...
- outside of -drawRect:,
- with no shadows or masks (transparent gradients, for instance,)
- without text (CATextLayer, UILabels, Core Text, UIFont,)
- with -shouldRasterize: assigned to NO (the default,)
- without overriding -drawInContext: (which draws a CALayer's content to a CGContext,)
- with any OpenGL code at all,
...you're going to quickly end up in the land of seconds per frame instead of frames per second.
No. :D
QuartzGL runs all Core Graphics on the GPU[1]. It's only available on OS X.
If you can show me evidence that some API on iOS runs Core Graphics on the GPU, I'd be happy to know. I do a fair amount of work running Core Animation, CG and OpenGL at the same time, so it would be a big help.
[1] - http://www.cocoawithlove.com/2011/03/mac-quartzgl-2d-drawing...
Great resource for what you're looking for. Including downloadable Photoshop actions to make it all easier.