Domanda

I'be created several apps in the past by just making UI elements in Photoshop. However I recently discovered PaintCode and am wondering how much "better" it is to create the entire UI with UIView and UIButton subclasses and draw them in drawRect. If not, is drawRect mostly used for dynamic images or UI elements (ie. charts, graphs).

Also, what about glowing or animated UI elements? If I wanted to make my button fade in/out would drawRect be the way to go?

È stato utile?

Soluzione

Found out that unless the image that needs to be drawn is dynamic (i.e. graphs) you should use PNGs as Xcode properly converts the PNGs to be best compatible with iOS. I have been using PNGs heavily with cap insets which reduces my file size significantly. Also, in Photoshop I have been saving-for-web to reduce file size a bit.

Cheers!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top