News for hackers. Stuff that matters.
Re:Designing for iOS: Taming UIButton by flyosity on Friday October 12, 2012 @11:19AM (#4645396)
Also, calling -imageNamed to load your images will automatically cache the contents. Numerous Apple engineers have told me not to draw UIs in code and just to use images instead, so although it's a fun challenge, there really is no upside. Even animations in iOS like the jiggling/opening trash are just a series of PNGs using UIImageView animation.
Re:Designing for iOS: Taming UIButton by RandallBrown on Friday October 12, 2012 @12:50PM (#4645832)
there are plenty of upsides to drawing UIs in code. You get resizable controls, controls you can change the color on, controls that can be added easier programatically, and smaller app bundles.
Re:Designing for iOS: Taming UIButton by masklinn on Friday October 12, 2012 @01:55PM (#4646117)
> You get resizable controls

You also have that with images, so that does not apply.

You do get the rest, which has to be weighted against lower performances and higher maintainability costs.

Re:Designing for iOS: Taming UIButton by potatolicious on Friday October 12, 2012 @02:10PM (#4646193)
> "You also have that with images, so that does not apply."

No, it very much still does. The only sort of resizing you get with images is whatever neatly fits within a 9-patch.

Which is to say, if your center patch is non-uniform (gradient? textured surface?) you lose resizability.

So yes, if you design a very standard UI that sails very close to the default iOS look and feel, you will be using stretchable images for almost everything. Which is to say, single-line elements that do not resize vertically at all, vertical linear gradients as an aesthetic theme instead of texturing (which is becoming a thing now), etc.

The moment you depart those shores though, images start becoming a liability instead of an asset, and you'll need to do a lot more custom work to get your widgets to resize properly.