IOS app view background (Image vs draw) design question

Suppose I wrote a game in which there was a relatively complex geometric game board. Something like a target.

I would like to see the status of the game. What is the best way to implement this view?

For example, should I draw a panel off the line in Photoshop, add it as a resource, and then show it using UIImageView? Or should I use drawing primitives and essentially draw the board programmatically?

What are the tradeoffs?

If I use an image, what format should I use? .Png, .tiff, .gif, .jpg?

Thanks, John

+4
source share
2 answers

If you decide to go the image route, you should use png. Displays any other format you pay for a performance hit (as noted in the comment).

To decide how to build a photoshop or drawing using code, you need to decide how much time you want to spend studying Quartz / CoreGraphics. Apple docs:

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html

If you already know Photoshop, then building graphics is probably a lot easier if you don't study Quartz, it's a less steep learning curve than Photoshop ...

+2
source

If this is a simple board, it’s easy enough to insert it into the presentation, which gives you the ability to easily manipulate it in an interesting way. Drawing in the view is performed using a set of primitives of type postcript.

For something more fanciful, Photoshop might be the way to go.

PNG is preferred.

+1
source

Source: https://habr.com/ru/post/1336258/


All Articles